@@ -122,11 +122,11 @@ export class PlatformService implements IPlatformService {
122122 let customTemplateOptions = this . getPathToPlatformTemplate ( this . $options . platformTemplate , platformData . frameworkPackageName ) . wait ( ) ;
123123 let pathToTemplate = customTemplateOptions && customTemplateOptions . pathToTemplate ;
124124 platformData . platformProjectService . createProject ( path . resolve ( frameworkDir ) , installedVersion , pathToTemplate ) . wait ( ) ;
125- platformData . platformProjectService . ensureConfigurationFileInAppResources ( ) . wait ( ) ;
125+ platformData . platformProjectService . ensureConfigurationFileInAppResources ( ) ;
126126 platformData . platformProjectService . interpolateData ( ) . wait ( ) ;
127127 platformData . platformProjectService . afterCreateProject ( platformData . projectRoot ) ;
128128
129- this . applyBaseConfigOption ( platformData ) . wait ( ) ;
129+ this . applyBaseConfigOption ( platformData ) ;
130130
131131 let frameworkPackageNameData : any = { version : installedVersion } ;
132132 if ( customTemplateOptions ) {
@@ -255,7 +255,7 @@ export class PlatformService implements IPlatformService {
255255 this . $projectFilesManager . processPlatformSpecificFiles ( directoryPath , platform , excludedDirs ) ;
256256
257257 if ( changeInfo . configChanged || changeInfo . modulesChanged ) {
258- this . applyBaseConfigOption ( platformData ) . wait ( ) ;
258+ this . applyBaseConfigOption ( platformData ) ;
259259 platformData . platformProjectService . processConfigurationFilesFromAppResources ( ) . wait ( ) ;
260260 }
261261
@@ -268,7 +268,7 @@ export class PlatformService implements IPlatformService {
268268 private copyAppFiles ( platform : string ) : IFuture < void > {
269269 return ( ( ) => {
270270 let platformData = this . $platformsData . getPlatformData ( platform ) ;
271- platformData . platformProjectService . ensureConfigurationFileInAppResources ( ) . wait ( ) ;
271+ platformData . platformProjectService . ensureConfigurationFileInAppResources ( ) ;
272272 let appDestinationDirectoryPath = path . join ( platformData . appDestinationDirectoryPath , constants . APP_FOLDER_NAME ) ;
273273
274274 // Copy app folder to native project
@@ -376,23 +376,21 @@ export class PlatformService implements IPlatformService {
376376 return packageFile ;
377377 }
378378
379- public copyLastOutput ( platform : string , targetPath : string , settings : { isForDevice : boolean } ) : IFuture < void > {
380- return ( ( ) => {
381- platform = platform . toLowerCase ( ) ;
382- targetPath = path . resolve ( targetPath ) ;
379+ public copyLastOutput ( platform : string , targetPath : string , settings : { isForDevice : boolean } ) : void {
380+ platform = platform . toLowerCase ( ) ;
381+ targetPath = path . resolve ( targetPath ) ;
383382
384- let packageFile = this . lastOutputPath ( platform , settings ) ;
383+ let packageFile = this . lastOutputPath ( platform , settings ) ;
385384
386- this . $fs . ensureDirectoryExists ( path . dirname ( targetPath ) ) ;
385+ this . $fs . ensureDirectoryExists ( path . dirname ( targetPath ) ) ;
387386
388- if ( this . $fs . exists ( targetPath ) && this . $fs . getFsStats ( targetPath ) . isDirectory ( ) ) {
389- let sourceFileName = path . basename ( packageFile ) ;
390- this . $logger . trace ( `Specified target path: '${ targetPath } ' is directory. Same filename will be used: '${ sourceFileName } '.` ) ;
391- targetPath = path . join ( targetPath , sourceFileName ) ;
392- }
393- this . $fs . copyFile ( packageFile , targetPath ) . wait ( ) ;
394- this . $logger . info ( `Copied file '${ packageFile } ' to '${ targetPath } '.` ) ;
395- } ) . future < void > ( ) ( ) ;
387+ if ( this . $fs . exists ( targetPath ) && this . $fs . getFsStats ( targetPath ) . isDirectory ( ) ) {
388+ let sourceFileName = path . basename ( packageFile ) ;
389+ this . $logger . trace ( `Specified target path: '${ targetPath } ' is directory. Same filename will be used: '${ sourceFileName } '.` ) ;
390+ targetPath = path . join ( targetPath , sourceFileName ) ;
391+ }
392+ this . $fs . copyFile ( packageFile , targetPath ) ;
393+ this . $logger . info ( `Copied file '${ packageFile } ' to '${ targetPath } '.` ) ;
396394 }
397395
398396 public removePlatforms ( platforms : string [ ] ) : void {
@@ -641,14 +639,12 @@ export class PlatformService implements IPlatformService {
641639 } ) . future < void > ( ) ( ) ;
642640 }
643641
644- private applyBaseConfigOption ( platformData : IPlatformData ) : IFuture < void > {
645- return ( ( ) => {
646- if ( this . $options . baseConfig ) {
647- let newConfigFile = path . resolve ( this . $options . baseConfig ) ;
648- this . $logger . trace ( `Replacing '${ platformData . configurationFilePath } ' with '${ newConfigFile } '.` ) ;
649- this . $fs . copyFile ( newConfigFile , platformData . configurationFilePath ) . wait ( ) ;
650- }
651- } ) . future < void > ( ) ( ) ;
642+ private applyBaseConfigOption ( platformData : IPlatformData ) : void {
643+ if ( this . $options . baseConfig ) {
644+ let newConfigFile = path . resolve ( this . $options . baseConfig ) ;
645+ this . $logger . trace ( `Replacing '${ platformData . configurationFilePath } ' with '${ newConfigFile } '.` ) ;
646+ this . $fs . copyFile ( newConfigFile , platformData . configurationFilePath ) ;
647+ }
652648 }
653649}
654650$injector . register ( "platformService" , PlatformService ) ;
0 commit comments