@@ -22,6 +22,7 @@ import {
2222 template ,
2323 url ,
2424} from '@angular-devkit/schematics' ;
25+ import { Schema as ComponentOptions } from '../component/schema' ;
2526import { Schema as E2eOptions } from '../e2e/schema' ;
2627import {
2728 addProjectToWorkspace ,
@@ -241,11 +242,9 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace
241242}
242243
243244function 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 / ] ;
245+ 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 ) $ / ;
247246
248- return ! toRemoveList . some ( re => re . test ( path ) ) ;
247+ return ! toRemoveList . test ( path ) ;
249248}
250249
251250export default function ( options : ApplicationOptions ) : Rule {
@@ -256,20 +255,20 @@ export default function (options: ApplicationOptions): Rule {
256255 validateProjectName ( options . name ) ;
257256 const prefix = options . prefix || 'app' ;
258257 const appRootSelector = `${ prefix } -root` ;
259- const componentOptions = ! options . minimal ?
260- {
261- inlineStyle : options . inlineStyle ,
262- inlineTemplate : options . inlineTemplate ,
263- spec : ! options . skipTests ,
264- styleext : options . style ,
265- viewEncapsulation : options . viewEncapsulation ,
266- } :
267- {
268- inlineStyle : true ,
269- InlineTemplate : true ,
270- spec : false ,
271- styleext : options . style ,
272- } ;
258+ const componentOptions : Partial < ComponentOptions > = ! options . minimal ?
259+ {
260+ inlineStyle : options . inlineStyle ,
261+ inlineTemplate : options . inlineTemplate ,
262+ spec : ! options . skipTests ,
263+ styleext : options . style ,
264+ viewEncapsulation : options . viewEncapsulation ,
265+ } :
266+ {
267+ inlineStyle : true ,
268+ inlineTemplate : true ,
269+ spec : false ,
270+ styleext : options . style ,
271+ } ;
273272
274273 const workspace = getWorkspace ( host ) ;
275274 let newProjectRoot = workspace . newProjectRoot ;
@@ -323,9 +322,8 @@ export default function (options: ApplicationOptions): Rule {
323322 } ) ,
324323 move ( appDir ) ,
325324 ] ) ) ,
326- mergeWith (
325+ options . minimal ? noop ( ) : mergeWith (
327326 apply ( url ( './files/lint' ) , [
328- options . minimal ? filter ( minimalPathFilter ) : noop ( ) ,
329327 template ( {
330328 utils : strings ,
331329 ...options ,
0 commit comments