From a09aa490dcc1bffb5616acf451cef5353878f8c2 Mon Sep 17 00:00:00 2001 From: Sumit Arora Date: Thu, 9 Mar 2017 11:33:06 -0500 Subject: [PATCH] fix(@angular/cli): Fixing aliases for blueprint help --- packages/@angular/cli/blueprints/class/index.ts | 1 + packages/@angular/cli/blueprints/component/index.ts | 1 + packages/@angular/cli/blueprints/directive/index.ts | 1 + packages/@angular/cli/blueprints/enum/index.ts | 1 + packages/@angular/cli/blueprints/guard/index.ts | 1 + packages/@angular/cli/blueprints/interface/index.ts | 1 + packages/@angular/cli/blueprints/module/index.ts | 1 + packages/@angular/cli/blueprints/pipe/index.ts | 1 + packages/@angular/cli/blueprints/service/index.ts | 1 + packages/@angular/cli/commands/generate.ts | 3 ++- .../cli/ember-cli/lib/utilities/printable-properties.js | 1 + 11 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/@angular/cli/blueprints/class/index.ts b/packages/@angular/cli/blueprints/class/index.ts index 0b4ffe85eeb7..72486aa0ba0f 100644 --- a/packages/@angular/cli/blueprints/class/index.ts +++ b/packages/@angular/cli/blueprints/class/index.ts @@ -8,6 +8,7 @@ const getFiles = Blueprint.prototype.files; export default Blueprint.extend({ description: '', + aliases: ['cl'], availableOptions: [ { diff --git a/packages/@angular/cli/blueprints/component/index.ts b/packages/@angular/cli/blueprints/component/index.ts index 2ef24c7c102e..575c2d85308a 100644 --- a/packages/@angular/cli/blueprints/component/index.ts +++ b/packages/@angular/cli/blueprints/component/index.ts @@ -14,6 +14,7 @@ const astUtils = require('../../utilities/ast-utils'); export default Blueprint.extend({ description: '', + aliases: ['c'], availableOptions: [ { diff --git a/packages/@angular/cli/blueprints/directive/index.ts b/packages/@angular/cli/blueprints/directive/index.ts index 50ddaf00c0d7..691dbd0876b5 100644 --- a/packages/@angular/cli/blueprints/directive/index.ts +++ b/packages/@angular/cli/blueprints/directive/index.ts @@ -14,6 +14,7 @@ const getFiles = Blueprint.prototype.files; export default Blueprint.extend({ description: '', + aliases: ['d'], availableOptions: [ { diff --git a/packages/@angular/cli/blueprints/enum/index.ts b/packages/@angular/cli/blueprints/enum/index.ts index 94ddb8d5f4ab..eb0475fcd299 100644 --- a/packages/@angular/cli/blueprints/enum/index.ts +++ b/packages/@angular/cli/blueprints/enum/index.ts @@ -6,6 +6,7 @@ const Blueprint = require('../../ember-cli/lib/models/blueprint'); export default Blueprint.extend({ description: '', + aliases: ['e'], availableOptions: [ { diff --git a/packages/@angular/cli/blueprints/guard/index.ts b/packages/@angular/cli/blueprints/guard/index.ts index 52652086ff09..04ab6977b5d0 100644 --- a/packages/@angular/cli/blueprints/guard/index.ts +++ b/packages/@angular/cli/blueprints/guard/index.ts @@ -14,6 +14,7 @@ const getFiles = Blueprint.prototype.files; export default Blueprint.extend({ description: '', + aliases: ['g'], availableOptions: [ { diff --git a/packages/@angular/cli/blueprints/interface/index.ts b/packages/@angular/cli/blueprints/interface/index.ts index 46f73c7cba7b..2c6cea3bba55 100644 --- a/packages/@angular/cli/blueprints/interface/index.ts +++ b/packages/@angular/cli/blueprints/interface/index.ts @@ -7,6 +7,7 @@ const Blueprint = require('../../ember-cli/lib/models/blueprint'); export default Blueprint.extend({ description: '', + aliases: ['i'], anonymousOptions: [ '' diff --git a/packages/@angular/cli/blueprints/module/index.ts b/packages/@angular/cli/blueprints/module/index.ts index 3332033cc503..0fd1326fa591 100644 --- a/packages/@angular/cli/blueprints/module/index.ts +++ b/packages/@angular/cli/blueprints/module/index.ts @@ -8,6 +8,7 @@ const getFiles = Blueprint.prototype.files; export default Blueprint.extend({ description: '', + aliases: ['m'], availableOptions: [ { diff --git a/packages/@angular/cli/blueprints/pipe/index.ts b/packages/@angular/cli/blueprints/pipe/index.ts index 99c50281a8fe..95676266a57d 100644 --- a/packages/@angular/cli/blueprints/pipe/index.ts +++ b/packages/@angular/cli/blueprints/pipe/index.ts @@ -14,6 +14,7 @@ const getFiles = Blueprint.prototype.files; export default Blueprint.extend({ description: '', + aliases: ['p'], availableOptions: [ { diff --git a/packages/@angular/cli/blueprints/service/index.ts b/packages/@angular/cli/blueprints/service/index.ts index bb41938f3532..5443238603e1 100644 --- a/packages/@angular/cli/blueprints/service/index.ts +++ b/packages/@angular/cli/blueprints/service/index.ts @@ -14,6 +14,7 @@ const getFiles = Blueprint.prototype.files; export default Blueprint.extend({ description: '', + aliases: ['s'], availableOptions: [ { diff --git a/packages/@angular/cli/commands/generate.ts b/packages/@angular/cli/commands/generate.ts index 830a93a2d35d..8114ffb58432 100644 --- a/packages/@angular/cli/commands/generate.ts +++ b/packages/@angular/cli/commands/generate.ts @@ -61,7 +61,8 @@ const aliasMap: { [alias: string]: string } = { 'm': 'module', 'p': 'pipe', 'r': 'route', - 's': 'service' + 's': 'service', + 'g': 'guard' }; export default GenerateCommand; diff --git a/packages/@angular/cli/ember-cli/lib/utilities/printable-properties.js b/packages/@angular/cli/ember-cli/lib/utilities/printable-properties.js index 21b6b5b63f07..2fe13f045493 100644 --- a/packages/@angular/cli/ember-cli/lib/utilities/printable-properties.js +++ b/packages/@angular/cli/ember-cli/lib/utilities/printable-properties.js @@ -10,6 +10,7 @@ var commandProperties = [ ]; var blueprintProperties = [ 'name', + 'aliases', 'description', 'availableOptions', 'anonymousOptions',