@@ -132,11 +132,7 @@ export class PlatformService implements IPlatformService {
132
132
platformData . platformProjectService . interpolateData ( ) . wait ( ) ;
133
133
platformData . platformProjectService . afterCreateProject ( platformData . projectRoot ) . wait ( ) ;
134
134
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 ( ) ;
140
136
141
137
let frameworkPackageNameData : any = { version : installedVersion } ;
142
138
if ( customTemplateOptions ) {
@@ -306,6 +302,8 @@ export class PlatformService implements IPlatformService {
306
302
// Replace placeholders in configuration files
307
303
platformData . platformProjectService . interpolateConfigurationFile ( ) . wait ( ) ;
308
304
305
+ this . applyBaseConfigOption ( platformData ) . wait ( ) ;
306
+
309
307
this . $logger . out ( "Project successfully prepared" ) ;
310
308
return true ;
311
309
} ) . future < boolean > ( ) ( ) ;
@@ -684,5 +682,15 @@ export class PlatformService implements IPlatformService {
684
682
private mapFrameworkFiles ( npmCacheDirectoryPath : string , files : string [ ] ) : string [ ] {
685
683
return _ . map ( files , file => file . substr ( npmCacheDirectoryPath . length + constants . PROJECT_FRAMEWORK_FOLDER_NAME . length + 1 ) ) ;
686
684
}
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
+ }
687
695
}
688
696
$injector . register ( "platformService" , PlatformService ) ;
0 commit comments