@@ -15,7 +15,12 @@ export default Blueprint.extend({
1515 { name : 'routing' , type : Boolean , default : false } ,
1616 { name : 'inline-style' , type : Boolean , default : false , aliases : [ 'is' ] } ,
1717 { name : 'inline-template' , type : Boolean , default : false , aliases : [ 'it' ] } ,
18- { name : 'skip-git' , type : Boolean , default : false , aliases : [ 'sg' ] }
18+ { name : 'skip-git' , type : Boolean , default : false , aliases : [ 'sg' ] } ,
19+ { name : 'minimal' ,
20+ type : Boolean ,
21+ default : false ,
22+ description : 'Should create a minimal app.'
23+ }
1924 ] ,
2025
2126 beforeInstall : function ( options : any ) {
@@ -26,6 +31,12 @@ export default Blueprint.extend({
2631 } ,
2732
2833 locals : function ( options : any ) {
34+ if ( options . minimal ) {
35+ options . inlineStyle = true ;
36+ options . inlineTemplate = true ;
37+ options . skipTests = true ;
38+ }
39+
2940 this . styleExt = options . style === 'stylus' ? 'styl' : options . style ;
3041 if ( ! options . style ) {
3142 this . styleExt = CliConfig . getValue ( 'defaults.styleExt' ) || 'css' ;
@@ -54,7 +65,8 @@ export default Blueprint.extend({
5465 routing : options . routing ,
5566 inlineStyle : options . inlineStyle ,
5667 inlineTemplate : options . inlineTemplate ,
57- tests : this . tests
68+ tests : this . tests ,
69+ minimal : options . minimal
5870 } ;
5971 } ,
6072
@@ -78,6 +90,14 @@ export default Blueprint.extend({
7890 fileList = fileList . filter ( p => p . indexOf ( 'app.component.spec.ts' ) < 0 ) ;
7991 }
8092
93+ if ( this . options && this . options . minimal ) {
94+ const toRemoveList : RegExp [ ] = [ / e 2 e \/ / , / e d i t o r c o n f i g / , / R E A D M E / , / k a r m a .c o n f .j s / ,
95+ / p r o t r a c t o r .c o n f .j s / , / t e s t .t s / , / t s c o n f i g .s p e c .j s o n / , / t s l i n t .j s o n / , / f a v i c o n .i c o / ] ;
96+ fileList = fileList . filter ( p => {
97+ return ! toRemoveList . some ( re => re . test ( p ) ) ;
98+ } ) ;
99+ }
100+
81101 const cliConfig = CliConfig . fromProject ( ) ;
82102 const ngConfig = cliConfig && cliConfig . config ;
83103 if ( ! ngConfig || ngConfig . packageManager != 'yarn' ) {
0 commit comments