@@ -73,6 +73,8 @@ exports.ProjectTemplate = class {
73
73
this . environments ,
74
74
this . aureliaJSON
75
75
) ;
76
+
77
+ this . addedFeatures = { } ;
76
78
}
77
79
78
80
get name ( ) {
@@ -183,8 +185,10 @@ exports.ProjectTemplate = class {
183
185
184
186
configureDefaultSetup ( ) {
185
187
this . addToSource (
186
- ProjectItem . resource ( 'app.ext' , 'src/app.ext' , this . model . transpiler ) ,
187
- ProjectItem . resource ( 'app.ext' , 'src/app.ext' , this . model . markupProcessor ) ,
188
+ ProjectItem . resource ( 'app.ext' , 'src/app.template.ext' , this . model . transpiler )
189
+ . asTemplate ( this . model ) ,
190
+ ProjectItem . resource ( 'app.ext' , 'src/app.template.ext' , this . model . markupProcessor )
191
+ . asTemplate ( this . model , { type : this . model . markupProcessor } ) ,
188
192
ProjectItem . resource ( 'environment.ext' , 'environments/dev.js' , this . model . transpiler )
189
193
) . addToResources (
190
194
ProjectItem . resource ( 'index.ext' , 'src/resources/index.ext' , this . model . transpiler )
@@ -309,6 +313,31 @@ exports.ProjectTemplate = class {
309
313
return this ;
310
314
}
311
315
316
+ addToAureliaDependencies ( ) {
317
+ this . model . build . bundles [ 1 ] . dependencies . push ( ...arguments ) ;
318
+ return this ;
319
+ }
320
+
321
+ addToAureliaPrepend ( ) {
322
+ this . model . build . bundles [ 1 ] . prepend . push ( ...arguments ) ;
323
+ return this ;
324
+ }
325
+
326
+ addToCopyFiles ( files ) {
327
+ this . model . build . copyFiles = Object . assign ( { } , this . model . copyFiles , files ) ;
328
+ return this ;
329
+ }
330
+
331
+ addFeature ( featureName , project , model , options ) {
332
+ if ( this . addedFeatures [ featureName ] ) {
333
+ return ;
334
+ }
335
+ this . addedFeatures [ featureName ] = true ;
336
+ model . features [ featureName ] = featureName ;
337
+ let feature = require ( `../../resources/features/${ featureName } ` ) ;
338
+ feature ( project , model , options ) ;
339
+ }
340
+
312
341
renderManualInstructions ( ) {
313
342
let instructions = this . manualInstructions . getText ( ) ;
314
343
if ( instructions ) {
0 commit comments