Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit e0ea4ff

Browse files
committed
fix(@schematics/angular): fix module discovery
When creating schematics with names that are paths, the path option is the path to create the schematic into. we need to app root to discover the module.
1 parent 76a4296 commit e0ea4ff

File tree

19 files changed

+39
-1
lines changed

19 files changed

+39
-1
lines changed

packages/schematics/angular/class/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
export interface Schema {
1010
name: string;
11+
appRoot?: string;
1112
path?: string;
1213
sourceDir?: string;
1314
/**

packages/schematics/angular/class/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"name": {
88
"type": "string"
99
},
10+
"appRoot": {
11+
"type": "string"
12+
},
1013
"path": {
1114
"type": "string",
1215
"default": "app"

packages/schematics/angular/component/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
export interface Schema {
1010
path?: string;
11+
appRoot?: string;
1112
sourceDir?: string;
1213
name: string;
1314
/**

packages/schematics/angular/component/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"type": "string",
99
"default": "app"
1010
},
11+
"appRoot": {
12+
"type": "string"
13+
},
1114
"sourceDir": {
1215
"type": "string",
1316
"default": "src",

packages/schematics/angular/directive/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
export interface Schema {
1010
name: string;
1111
path?: string;
12+
appRoot?: string;
1213
/**
1314
* The prefix to apply to generated selectors.
1415
*/

packages/schematics/angular/directive/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"type": "string",
1212
"default": "app"
1313
},
14+
"appRoot": {
15+
"type": "string"
16+
},
1417
"prefix": {
1518
"type": "string",
1619
"description": "The prefix to apply to generated selectors.",

packages/schematics/angular/enum/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
export interface Schema {
1010
name: string;
1111
path?: string;
12+
appRoot?: string;
1213
sourceDir?: string;
1314
}

packages/schematics/angular/enum/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"type": "string",
1212
"default": "app"
1313
},
14+
"appRoot": {
15+
"type": "string"
16+
},
1417
"sourceDir": {
1518
"type": "string",
1619
"default": "src"

packages/schematics/angular/guard/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ export interface Schema {
1515
*/
1616
module?: string;
1717
path?: string;
18+
appRoot?: string;
1819
sourceDir?: string;
1920
}

packages/schematics/angular/guard/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
"type": "string",
2626
"default": "app"
2727
},
28+
"appRoot": {
29+
"type": "string"
30+
},
2831
"sourceDir": {
2932
"type": "string",
3033
"default": "src"

0 commit comments

Comments
 (0)