@@ -21,13 +21,13 @@ import {
21
21
SchematicsException ,
22
22
Tree ,
23
23
apply ,
24
+ applyTemplates ,
24
25
chain ,
25
26
filter ,
26
27
mergeWith ,
27
28
move ,
28
29
noop ,
29
30
schematic ,
30
- template ,
31
31
url ,
32
32
} from '@angular-devkit/schematics' ;
33
33
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks' ;
@@ -292,7 +292,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace
292
292
}
293
293
294
294
function minimalPathFilter ( path : string ) : boolean {
295
- 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 ) $ / ;
295
+ 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 ) . t e m p l a t e $ / ;
296
296
297
297
return ! toRemoveList . test ( path ) ;
298
298
}
@@ -351,7 +351,7 @@ export default function (options: ApplicationOptions): Rule {
351
351
mergeWith (
352
352
apply ( url ( './files/src' ) , [
353
353
options . minimal ? filter ( minimalPathFilter ) : noop ( ) ,
354
- template ( {
354
+ applyTemplates ( {
355
355
utils : strings ,
356
356
...options ,
357
357
'dot' : '.' ,
@@ -362,7 +362,7 @@ export default function (options: ApplicationOptions): Rule {
362
362
mergeWith (
363
363
apply ( url ( './files/root' ) , [
364
364
options . minimal ? filter ( minimalPathFilter ) : noop ( ) ,
365
- template ( {
365
+ applyTemplates ( {
366
366
utils : strings ,
367
367
...options ,
368
368
'dot' : '.' ,
@@ -374,7 +374,7 @@ export default function (options: ApplicationOptions): Rule {
374
374
] ) ) ,
375
375
options . minimal ? noop ( ) : mergeWith (
376
376
apply ( url ( './files/lint' ) , [
377
- template ( {
377
+ applyTemplates ( {
378
378
utils : strings ,
379
379
...options ,
380
380
tsLintRoot,
@@ -406,9 +406,13 @@ export default function (options: ApplicationOptions): Rule {
406
406
} ) ,
407
407
mergeWith (
408
408
apply ( url ( './other-files' ) , [
409
- componentOptions . inlineTemplate ? filter ( path => ! path . endsWith ( '.html' ) ) : noop ( ) ,
410
- componentOptions . skipTests ? filter ( path => ! / [ . | - ] s p e c .t s $ / . test ( path ) ) : noop ( ) ,
411
- template ( {
409
+ componentOptions . inlineTemplate
410
+ ? filter ( path => ! path . endsWith ( '.html.template' ) )
411
+ : noop ( ) ,
412
+ componentOptions . skipTests
413
+ ? filter ( path => ! / [ . | - ] s p e c .t s .t e m p l a t e $ / . test ( path ) )
414
+ : noop ( ) ,
415
+ applyTemplates ( {
412
416
utils : strings ,
413
417
...options as any , // tslint:disable-line:no-any
414
418
selector : appRootSelector ,
0 commit comments