Skip to content

Commit 427490a

Browse files
Broccohansl
authored andcommitted
feat(@schematics/angular): Update aliases to all use single character
1 parent 812ee3e commit 427490a

5 files changed

Lines changed: 19 additions & 14 deletions

File tree

packages/schematics/angular/app-shell/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"format": "path",
9696
"description": "The path of the source directory.",
9797
"default": "src",
98-
"alias": "sd"
98+
"alias": "D"
9999
}
100100
},
101101
"required": [

packages/schematics/angular/application/index_spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,10 @@ describe('Application Schematic', () => {
114114
const content = tree.readContent(path);
115115
expect(content).toMatch(/import { AppComponent } from \'\.\/app\.component\';/);
116116
});
117+
118+
it('should use the directory option', () => {
119+
const options = { ...defaultOptions, directory: 'my-dir' };
120+
const tree = schematicRunner.runSchematic('application', options);
121+
expect(tree.exists('/my-dir/package.json')).toEqual(true);
122+
});
117123
});

packages/schematics/angular/application/schema.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"directory": {
88
"type": "string",
99
"format": "path",
10-
"description": "The directory name to create the app in.",
11-
"alias": "dir"
10+
"description": "The directory name to create the app in."
1211
},
1312
"path": {
1413
"type": "string",
@@ -22,7 +21,7 @@
2221
"format": "path",
2322
"description": "The path of the source directory.",
2423
"default": "src",
25-
"alias": "sd",
24+
"alias": "D",
2625
"visible": false
2726
},
2827
"name": {
@@ -34,13 +33,13 @@
3433
"description": "Specifies if the style will be in the ts file.",
3534
"type": "boolean",
3635
"default": false,
37-
"alias": "is"
36+
"alias": "s"
3837
},
3938
"inlineTemplate": {
4039
"description": "Specifies if the template will be in the ts file.",
4140
"type": "boolean",
4241
"default": false,
43-
"alias": "it"
42+
"alias": "t"
4443
},
4544
"viewEncapsulation": {
4645
"description": "Specifies the view encapsulation strategy.",
@@ -73,7 +72,7 @@
7372
"description": "Skip creating spec files.",
7473
"type": "boolean",
7574
"default": false,
76-
"alias": "st"
75+
"alias": "S"
7776
},
7877
"skipInstall": {
7978
"description": "Skip installing dependency packages.",
@@ -90,7 +89,7 @@
9089
"description": "Skip initializing a git repository.",
9190
"type": "boolean",
9291
"default": false,
93-
"alias": "sg"
92+
"alias": "g"
9493
},
9594
"commit": {
9695
"description": "Initial repository commit information.",

packages/schematics/angular/component/schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"format": "path",
1717
"description": "The path of the source directory.",
1818
"default": "src",
19-
"alias": "sd",
19+
"alias": "D",
2020
"visible": false
2121
},
2222
"appRoot": {
@@ -33,26 +33,26 @@
3333
"description": "Specifies if the style will be in the ts file.",
3434
"type": "boolean",
3535
"default": false,
36-
"alias": "is"
36+
"alias": "s"
3737
},
3838
"inlineTemplate": {
3939
"description": "Specifies if the template will be in the ts file.",
4040
"type": "boolean",
4141
"default": false,
42-
"alias": "it"
42+
"alias": "t"
4343
},
4444
"viewEncapsulation": {
4545
"description": "Specifies the view encapsulation strategy.",
4646
"enum": ["Emulated", "Native", "None"],
4747
"type": "string",
48-
"alias": "ve"
48+
"alias": "v"
4949
},
5050
"changeDetection": {
5151
"description": "Specifies the change detection strategy.",
5252
"enum": ["Default", "OnPush"],
5353
"type": "string",
5454
"default": "Default",
55-
"alias": "cd"
55+
"alias": "c"
5656
},
5757
"prefix": {
5858
"type": "string",

packages/schematics/angular/universal/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"format": "path",
8282
"description": "The path of the source directory.",
8383
"default": "src",
84-
"alias": "sd"
84+
"alias": "D"
8585
}
8686
},
8787
"required": [

0 commit comments

Comments
 (0)