@@ -132,11 +132,7 @@ export class PlatformService implements IPlatformService {
132132 platformData . platformProjectService . interpolateData ( ) . wait ( ) ;
133133 platformData . platformProjectService . afterCreateProject ( platformData . projectRoot ) . wait ( ) ;
134134
135- if ( this . $options . baseConfig ) {
136- let newConfigFile = path . resolve ( this . $options . baseConfig ) ;
137- this . $logger . trace ( `Replacing '${ platformData . configurationFilePath } ' with '${ newConfigFile } '.` ) ;
138- this . $fs . copyFile ( newConfigFile , platformData . configurationFilePath ) . wait ( ) ;
139- }
135+ this . applyBaseConfigOption ( platformData ) . wait ( ) ;
140136
141137 let frameworkPackageNameData : any = { version : installedVersion } ;
142138 if ( customTemplateOptions ) {
@@ -306,6 +302,8 @@ export class PlatformService implements IPlatformService {
306302 // Replace placeholders in configuration files
307303 platformData . platformProjectService . interpolateConfigurationFile ( ) . wait ( ) ;
308304
305+ this . applyBaseConfigOption ( platformData ) . wait ( ) ;
306+
309307 this . $logger . out ( "Project successfully prepared" ) ;
310308 return true ;
311309 } ) . future < boolean > ( ) ( ) ;
@@ -684,5 +682,15 @@ export class PlatformService implements IPlatformService {
684682 private mapFrameworkFiles ( npmCacheDirectoryPath : string , files : string [ ] ) : string [ ] {
685683 return _ . map ( files , file => file . substr ( npmCacheDirectoryPath . length + constants . PROJECT_FRAMEWORK_FOLDER_NAME . length + 1 ) ) ;
686684 }
685+
686+ private applyBaseConfigOption ( platformData : IPlatformData ) : IFuture < void > {
687+ return ( ( ) => {
688+ if ( this . $options . baseConfig ) {
689+ let newConfigFile = path . resolve ( this . $options . baseConfig ) ;
690+ this . $logger . trace ( `Replacing '${ platformData . configurationFilePath } ' with '${ newConfigFile } '.` ) ;
691+ this . $fs . copyFile ( newConfigFile , platformData . configurationFilePath ) . wait ( ) ;
692+ }
693+ } ) . future < void > ( ) ( ) ;
694+ }
687695}
688696$injector . register ( "platformService" , PlatformService ) ;
0 commit comments