From 73e41dc83228f91b1a2c20a6025f773a669e1684 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Thu, 15 Feb 2018 10:48:24 -0500 Subject: [PATCH] feat(@schematics/angular): Update aliases to all use single character --- packages/schematics/angular/app-shell/schema.json | 2 +- .../schematics/angular/application/index_spec.ts | 6 ++++++ packages/schematics/angular/application/schema.json | 13 ++++++------- packages/schematics/angular/component/schema.json | 10 +++++----- packages/schematics/angular/universal/schema.json | 2 +- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index cfb3c8d37b..0d6fcf5ad1 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -95,7 +95,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd" + "alias": "D" } }, "required": [ diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts index 723e8391f1..85138a0c04 100644 --- a/packages/schematics/angular/application/index_spec.ts +++ b/packages/schematics/angular/application/index_spec.ts @@ -114,4 +114,10 @@ describe('Application Schematic', () => { const content = tree.readContent(path); expect(content).toMatch(/import { AppComponent } from \'\.\/app\.component\';/); }); + + it('should use the directory option', () => { + const options = { ...defaultOptions, directory: 'my-dir' }; + const tree = schematicRunner.runSchematic('application', options); + expect(tree.exists('/my-dir/package.json')).toEqual(true); + }); }); diff --git a/packages/schematics/angular/application/schema.json b/packages/schematics/angular/application/schema.json index 2166263131..308d5f43a3 100644 --- a/packages/schematics/angular/application/schema.json +++ b/packages/schematics/angular/application/schema.json @@ -7,8 +7,7 @@ "directory": { "type": "string", "format": "path", - "description": "The directory name to create the app in.", - "alias": "dir" + "description": "The directory name to create the app in." }, "path": { "type": "string", @@ -22,7 +21,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd", + "alias": "D", "visible": false }, "name": { @@ -34,13 +33,13 @@ "description": "Specifies if the style will be in the ts file.", "type": "boolean", "default": false, - "alias": "is" + "alias": "s" }, "inlineTemplate": { "description": "Specifies if the template will be in the ts file.", "type": "boolean", "default": false, - "alias": "it" + "alias": "t" }, "viewEncapsulation": { "description": "Specifies the view encapsulation strategy.", @@ -73,7 +72,7 @@ "description": "Skip creating spec files.", "type": "boolean", "default": false, - "alias": "st" + "alias": "S" }, "skipInstall": { "description": "Skip installing dependency packages.", @@ -90,7 +89,7 @@ "description": "Skip initializing a git repository.", "type": "boolean", "default": false, - "alias": "sg" + "alias": "g" }, "commit": { "description": "Initial repository commit information.", diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json index 7479112b38..7bbf952aca 100644 --- a/packages/schematics/angular/component/schema.json +++ b/packages/schematics/angular/component/schema.json @@ -16,7 +16,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd", + "alias": "D", "visible": false }, "appRoot": { @@ -33,26 +33,26 @@ "description": "Specifies if the style will be in the ts file.", "type": "boolean", "default": false, - "alias": "is" + "alias": "s" }, "inlineTemplate": { "description": "Specifies if the template will be in the ts file.", "type": "boolean", "default": false, - "alias": "it" + "alias": "t" }, "viewEncapsulation": { "description": "Specifies the view encapsulation strategy.", "enum": ["Emulated", "Native", "None"], "type": "string", - "alias": "ve" + "alias": "v" }, "changeDetection": { "description": "Specifies the change detection strategy.", "enum": ["Default", "OnPush"], "type": "string", "default": "Default", - "alias": "cd" + "alias": "c" }, "prefix": { "type": "string", diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index fa8f3528a8..e579eaefa9 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -81,7 +81,7 @@ "format": "path", "description": "The path of the source directory.", "default": "src", - "alias": "sd" + "alias": "D" } }, "required": [