@@ -240,6 +240,14 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace
240240 return addProjectToWorkspace ( workspace , options . name , project ) ;
241241}
242242
243+ function minimalPathFilter ( path : string ) : boolean {
244+ 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 / ,
245+ / 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 / ,
246+ / t s l i n t .j s o n / , / f a v i c o n .i c o / ] ;
247+
248+ return ! toRemoveList . some ( re => re . test ( path ) ) ;
249+ }
250+
243251export default function ( options : ApplicationOptions ) : Rule {
244252 return ( host : Tree , context : SchematicContext ) => {
245253 if ( ! options . name ) {
@@ -248,12 +256,19 @@ export default function (options: ApplicationOptions): Rule {
248256 validateProjectName ( options . name ) ;
249257 const prefix = options . prefix || 'app' ;
250258 const appRootSelector = `${ prefix } -root` ;
251- const componentOptions = {
259+ const componentOptions = ! options . minimal ?
260+ {
252261 inlineStyle : options . inlineStyle ,
253262 inlineTemplate : options . inlineTemplate ,
254263 spec : ! options . skipTests ,
255264 styleext : options . style ,
256265 viewEncapsulation : options . viewEncapsulation ,
266+ } :
267+ {
268+ inlineStyle : true ,
269+ InlineTemplate : true ,
270+ spec : false ,
271+ styleext : options . style ,
257272 } ;
258273
259274 const workspace = getWorkspace ( host ) ;
@@ -287,6 +302,7 @@ export default function (options: ApplicationOptions): Rule {
287302 options . skipPackageJson ? noop ( ) : addDependenciesToPackageJson ( ) ,
288303 mergeWith (
289304 apply ( url ( './files/src' ) , [
305+ options . minimal ? filter ( minimalPathFilter ) : noop ( ) ,
290306 template ( {
291307 utils : strings ,
292308 ...options ,
@@ -297,6 +313,7 @@ export default function (options: ApplicationOptions): Rule {
297313 ] ) ) ,
298314 mergeWith (
299315 apply ( url ( './files/root' ) , [
316+ options . minimal ? filter ( minimalPathFilter ) : noop ( ) ,
300317 template ( {
301318 utils : strings ,
302319 ...options ,
@@ -308,6 +325,7 @@ export default function (options: ApplicationOptions): Rule {
308325 ] ) ) ,
309326 mergeWith (
310327 apply ( url ( './files/lint' ) , [
328+ options . minimal ? filter ( minimalPathFilter ) : noop ( ) ,
311329 template ( {
312330 utils : strings ,
313331 ...options ,
0 commit comments