Skip to content

Commit 16d9dc9

Browse files
FatmeFatme
authored andcommitted
Merge pull request #215 from NativeScript/fatme/prepare-project-before-building1
Prepare platform before building
2 parents ad6ec4f + 1e21877 commit 16d9dc9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/commands/build.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ export class BuildCommand implements ICommand {
66
private $platformCommandParameter: ICommandParameter) { }
77

88
execute(args: string[]): IFuture<void> {
9-
return (() => {
10-
this.$platformService.buildPlatform(args[0]).wait();
11-
}).future<void>()();
9+
return this.$platformService.buildPlatform(args[0]);
1210
}
1311

1412
allowedParameters = [this.$platformCommandParameter];

lib/services/platform-service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export class PlatformService implements IPlatformService {
165165
public buildPlatform(platform: string): IFuture<void> {
166166
return (() => {
167167
platform = platform.toLowerCase();
168+
this.preparePlatform(platform);
168169

169170
var platformData = this.$platformsData.getPlatformData(platform);
170171
platformData.platformProjectService.buildProject(platformData.projectRoot).wait();

0 commit comments

Comments
 (0)