Skip to content

Commit 57dbcd5

Browse files
committed
fix: 🐛 schematics scope ignore routing.module file
1 parent 34bc788 commit 57dbcd5

File tree

2 files changed

+15
-31
lines changed

2 files changed

+15
-31
lines changed

schematics/package-lock.json

Lines changed: 11 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schematics/src/scope/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ export default function(options: SchemaOptions): Rule {
7070
const cmpRule = externalSchematic('@schematics/angular', 'module', options);
7171
const tree$ = (chain([cmpRule, translationFiles])(host, context) as Observable<Tree>).pipe(
7272
tap(tree => {
73-
const modulePath = tree.actions.find(action => !!action.path.match(/\.module\.ts/)).path;
73+
const modulePath = tree.actions.find(
74+
action => !!action.path.match(/\.module\.ts/) && !action.path.match(/-routing\.module\.ts/)
75+
).path;
76+
console.log(modulePath);
7477
addScopeToModule(tree, modulePath, options.name);
7578
})
7679
);

0 commit comments

Comments
 (0)