@@ -23,6 +23,7 @@ import {
2323 url ,
2424} from '@angular-devkit/schematics' ;
2525import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks' ;
26+ import { Schema as ComponentOptions } from '../component/schema' ;
2627import { Schema as E2eOptions } from '../e2e/schema' ;
2728import {
2829 addProjectToWorkspace ,
@@ -246,11 +247,9 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace
246247}
247248
248249function minimalPathFilter ( path : string ) : boolean {
249- 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 / ,
250- / 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 / ,
251- / t s l i n t .j s o n / , / f a v i c o n .i c o / ] ;
250+ const toRemoveList = / ( t e s t .t s | t s c o n f i g .s p e c .j s o n | k a r m a .c o n f .j s ) $ / ;
252251
253- return ! toRemoveList . some ( re => re . test ( path ) ) ;
252+ return ! toRemoveList . test ( path ) ;
254253}
255254
256255export default function ( options : ApplicationOptions ) : Rule {
@@ -261,20 +260,20 @@ export default function (options: ApplicationOptions): Rule {
261260 validateProjectName ( options . name ) ;
262261 const prefix = options . prefix || 'app' ;
263262 const appRootSelector = `${ prefix } -root` ;
264- const componentOptions = ! options . minimal ?
265- {
266- inlineStyle : options . inlineStyle ,
267- inlineTemplate : options . inlineTemplate ,
268- spec : ! options . skipTests ,
269- styleext : options . style ,
270- viewEncapsulation : options . viewEncapsulation ,
271- } :
272- {
273- inlineStyle : true ,
274- InlineTemplate : true ,
275- spec : false ,
276- styleext : options . style ,
277- } ;
263+ const componentOptions : Partial < ComponentOptions > = ! options . minimal ?
264+ {
265+ inlineStyle : options . inlineStyle ,
266+ inlineTemplate : options . inlineTemplate ,
267+ spec : ! options . skipTests ,
268+ styleext : options . style ,
269+ viewEncapsulation : options . viewEncapsulation ,
270+ } :
271+ {
272+ inlineStyle : true ,
273+ inlineTemplate : true ,
274+ spec : false ,
275+ styleext : options . style ,
276+ } ;
278277
279278 const workspace = getWorkspace ( host ) ;
280279 let newProjectRoot = workspace . newProjectRoot ;
@@ -327,9 +326,8 @@ export default function (options: ApplicationOptions): Rule {
327326 } ) ,
328327 move ( appDir ) ,
329328 ] ) ) ,
330- mergeWith (
329+ options . minimal ? noop ( ) : mergeWith (
331330 apply ( url ( './files/lint' ) , [
332- options . minimal ? filter ( minimalPathFilter ) : noop ( ) ,
333331 template ( {
334332 utils : strings ,
335333 ...options ,
0 commit comments