diff --git a/docs/documentation/generate/component.md b/docs/documentation/generate/component.md index 7ef966de37ba..5898a3db40e7 100644 --- a/docs/documentation/generate/component.md +++ b/docs/documentation/generate/component.md @@ -16,9 +16,9 @@ `--spec` specifies if a spec file is generated -`--view-encapsulation` (`-ve`) set the view encapsulation strategy +`--view-encapsulation` (`-ve`) specifies the view encapsulation strategy -`--change-detection` (`-cd`) set the change detection strategy +`--change-detection` (`-cd`) specifies the change detection strategy `--skip-import` allows for skipping the module import diff --git a/docs/documentation/generate/module.md b/docs/documentation/generate/module.md index da910ffc30ce..763d52e3d59f 100644 --- a/docs/documentation/generate/module.md +++ b/docs/documentation/generate/module.md @@ -6,6 +6,9 @@ `ng generate module [name]` generates an NgModule ## Options + +`--flat` flag to indicate if a dir is created + `--spec` specifies if a spec file is generated `--routing` specifies if a routing module file should be generated diff --git a/packages/@angular/cli/blueprints/class/index.ts b/packages/@angular/cli/blueprints/class/index.ts index cb3ad7480602..7086c4adaee5 100644 --- a/packages/@angular/cli/blueprints/class/index.ts +++ b/packages/@angular/cli/blueprints/class/index.ts @@ -7,7 +7,11 @@ export default Blueprint.extend({ description: '', availableOptions: [ - { name: 'spec', type: Boolean } + { + name: 'spec', + type: Boolean, + description: 'Specifies if a spec file is generated.' + } ], normalizeEntityName: function (entityName: string) { diff --git a/packages/@angular/cli/blueprints/component/index.ts b/packages/@angular/cli/blueprints/component/index.ts index e58c557d9dfa..4013b3259aea 100644 --- a/packages/@angular/cli/blueprints/component/index.ts +++ b/packages/@angular/cli/blueprints/component/index.ts @@ -14,16 +14,64 @@ export default Blueprint.extend({ description: '', availableOptions: [ - { name: 'flat', type: Boolean }, - { name: 'inline-template', type: Boolean, aliases: ['it'] }, - { name: 'inline-style', type: Boolean, aliases: ['is'] }, - { name: 'prefix', type: String, default: null }, - { name: 'spec', type: Boolean }, - { name: 'view-encapsulation', type: String, aliases: ['ve'] }, - { name: 'change-detection', type: String, aliases: ['cd'] }, - { name: 'skip-import', type: Boolean, default: false }, - { name: 'module', type: String, aliases: ['m'] }, - { name: 'export', type: Boolean, default: false } + { + name: 'flat', + type: Boolean, + description: 'Flag to indicate if a dir is created.' + }, + { + name: 'inline-template', + type: Boolean, + aliases: ['it'], + description: 'Specifies if the template will be in the ts file.' + }, + { + name: 'inline-style', + type: Boolean, + aliases: ['is'], + description: 'Specifies if the style will be in the ts file.' + }, + { + name: 'prefix', + type: String, + default: null, + description: 'Specifies whether to use the prefix.' + }, + { + name: 'spec', + type: Boolean, + description: 'Specifies if a spec file is generated.' + }, + { + name: 'view-encapsulation', + type: String, + aliases: ['ve'], + description: 'Specifies the view encapsulation strategy.' + }, + { + name: 'change-detection', + type: String, + aliases: ['cd'], + description: 'Specifies the change detection strategy.' + }, + { + name: 'skip-import', + type: Boolean, + default: false, + description: 'Allows for skipping the module import.' + }, + { + name: 'module', + type: String, + aliases: ['m'], + description: 'Allows specification of the declaring module.' + }, + { + name: 'export', + type: Boolean, + default: false, + description: 'Specifies if declaring module exports the component.' + } ], beforeInstall: function (options: any) { diff --git a/packages/@angular/cli/blueprints/directive/index.ts b/packages/@angular/cli/blueprints/directive/index.ts index 09632b269650..a5e002314949 100644 --- a/packages/@angular/cli/blueprints/directive/index.ts +++ b/packages/@angular/cli/blueprints/directive/index.ts @@ -14,12 +14,39 @@ export default Blueprint.extend({ description: '', availableOptions: [ - { name: 'flat', type: Boolean }, - { name: 'prefix', type: String, default: null }, - { name: 'spec', type: Boolean }, - { name: 'skip-import', type: Boolean, default: false }, - { name: 'module', type: String, aliases: ['m'] }, - { name: 'export', type: Boolean, default: false } + { + name: 'flat', + type: Boolean, + description: 'Flag to indicate if a dir is created.' + }, + { + name: 'prefix', + type: String, + default: null, + description: 'Specifies whether to use the prefix.' + }, + { + name: 'spec', + type: Boolean, + description: 'Specifies if a spec file is generated.' + }, + { + name: 'skip-import', + type: Boolean, + default: false, + description: 'Allows for skipping the module import.' + }, + { + name: 'module', + type: String, aliases: ['m'], + description: 'Allows specification of the declaring module.' + }, + { + name: 'export', + type: Boolean, + default: false, + description: 'Specifies if declaring module exports the component.' + } ], beforeInstall: function(options: any) { diff --git a/packages/@angular/cli/blueprints/module/index.ts b/packages/@angular/cli/blueprints/module/index.ts index db8fc905dd98..f23fa639d9e1 100644 --- a/packages/@angular/cli/blueprints/module/index.ts +++ b/packages/@angular/cli/blueprints/module/index.ts @@ -7,9 +7,22 @@ export default Blueprint.extend({ description: '', availableOptions: [ - { name: 'spec', type: Boolean }, - { name: 'flat', type: Boolean }, - { name: 'routing', type: Boolean, default: false } + { + name: 'spec', + type: Boolean, + description: 'Specifies if a spec file is generated.' + }, + { + name: 'flat', + type: Boolean, + description: 'Flag to indicate if a dir is created.' + }, + { + name: 'routing', + type: Boolean, + default: false, + description: 'Specifies if a routing module file should be generated.' + } ], normalizeEntityName: function (entityName: string) { diff --git a/packages/@angular/cli/blueprints/ng2/files/package.json b/packages/@angular/cli/blueprints/ng2/files/package.json index 9e26e508dc10..bd9037f726fa 100644 --- a/packages/@angular/cli/blueprints/ng2/files/package.json +++ b/packages/@angular/cli/blueprints/ng2/files/package.json @@ -2,7 +2,6 @@ "name": "<%= htmlComponentName %>", "version": "0.0.0", "license": "MIT", - "angular-cli": {}, "scripts": { "ng": "ng", "start": "ng serve", diff --git a/packages/@angular/cli/blueprints/pipe/index.ts b/packages/@angular/cli/blueprints/pipe/index.ts index f3af4279a341..2b8548515439 100644 --- a/packages/@angular/cli/blueprints/pipe/index.ts +++ b/packages/@angular/cli/blueprints/pipe/index.ts @@ -14,11 +14,34 @@ export default Blueprint.extend({ description: '', availableOptions: [ - { name: 'flat', type: Boolean }, - { name: 'spec', type: Boolean }, - { name: 'skip-import', type: Boolean, default: false }, - { name: 'module', type: String, aliases: ['m'] }, - { name: 'export', type: Boolean, default: false } + { + name: 'flat', + type: Boolean, + description: 'Flag to indicate if a dir is created.' + }, + { + name: 'spec', + type: Boolean, + description: 'Specifies if a spec file is generated.' + }, + { + name: 'skip-import', + type: Boolean, + default: false, + description: 'Allows for skipping the module import.' + }, + { + name: 'module', + type: String, + aliases: ['m'], + description: 'Allows specification of the declaring module.' + }, + { + name: 'export', + type: Boolean, + default: false, + description: 'Specifies if declaring module exports the pipe.' + } ], beforeInstall: function(options: any) { diff --git a/packages/@angular/cli/blueprints/service/index.ts b/packages/@angular/cli/blueprints/service/index.ts index 85683bae3124..5cad35bd0b88 100644 --- a/packages/@angular/cli/blueprints/service/index.ts +++ b/packages/@angular/cli/blueprints/service/index.ts @@ -14,9 +14,21 @@ export default Blueprint.extend({ description: '', availableOptions: [ - { name: 'flat', type: Boolean }, - { name: 'spec', type: Boolean }, - { name: 'module', type: String, aliases: ['m'] } + { + name: 'flat', + type: Boolean, + description: 'Flag to indicate if a dir is created.' + }, + { + name: 'spec', + type: Boolean, + description: 'Specifies if a spec file is generated.' + }, + { + name: 'module', + type: String, aliases: ['m'], + description: 'Allows specification of the declaring module.' + } ], beforeInstall: function(options: any) { diff --git a/packages/@angular/cli/lib/config/schema.json b/packages/@angular/cli/lib/config/schema.json index 74d136f46de6..74fd44d26ce9 100644 --- a/packages/@angular/cli/lib/config/schema.json +++ b/packages/@angular/cli/lib/config/schema.json @@ -12,9 +12,11 @@ "type": "object", "properties": { "version": { - "type": "string" + "type": "string", + "description": "The version of @angular/cli in the project." }, "name": { + "description": "The name of the project.", "type": "string" }, "ejected": { @@ -32,14 +34,17 @@ "type": "object", "properties": { "root": { - "type": "string" + "type": "string", + "description": "The root directory of the app." }, "outDir": { "type": "string", - "default": "dist/" + "default": "dist/", + "description": "The output directory for build results." }, "assets": { "type": "array", + "description": "List of application assets.", "items": { "oneOf": [ { @@ -50,15 +55,18 @@ "properties": { "glob": { "type": "string", - "default": "" + "default": "", + "description": "The pattern to match." }, "input": { "type": "string", - "default": "" + "default": "", + "description": "The dir to seach within." }, "output": { "type": "string", - "default": "" + "default": "", + "description": "The output path (relative to the outDir." } }, "additionalProperties": false @@ -68,27 +76,34 @@ "default": [] }, "deployUrl": { - "type": "string" + "type": "string", + "description": "" }, "index": { "type": "string", - "default": "index.html" + "default": "index.html", + "description": "The name of the start HTML file." }, "main": { - "type": "string" + "type": "string", + "description": "The name of the main entry-point file." }, "polyfills": { - "type": "string" + "type": "string", + "description": "The name of the polyfills file." }, "test": { - "type": "string" + "type": "string", + "description": "The name of the test entry-point file." }, "tsconfig": { "type": "string", - "default": "tsconfig.json" + "default": "tsconfig.json", + "description": "The name of the TypeScript configuration file." }, "prefix": { - "type": "string" + "type": "string", + "description": "The prefix to apply to generated selectors." }, "serviceWorker": { "description": "Experimental support for a service worker from @angular/service-worker.", @@ -169,31 +184,15 @@ }, "additionalProperties": false }, - "addons": { - "description": "Configuration reserved for installed third party addons.", - "type": "array", - "items": { - "type": "object", - "properties": {}, - "additionalProperties": true - } - }, - "packages": { - "description": "Configuration reserved for installed third party packages.", - "type": "array", - "items": { - "type": "object", - "properties": {}, - "additionalProperties": true - } - }, "e2e": { "type": "object", + "description": "Confirguration for end-to-end tests.", "properties": { "protractor": { "type": "object", "properties": { "config": { + "description": "Path to the config file.", "type": "string" } }, @@ -255,12 +254,14 @@ } }, "test": { + "description": "Configuration for unit tests.", "type": "object", "properties": { "karma": { "type": "object", "properties": { "config": { + "description": "Path to the karma config file.", "type": "string" } }, @@ -270,106 +271,132 @@ "additionalProperties": false }, "defaults": { + "description": "Specify the default values for generating.", "type": "object", "properties": { "styleExt": { + "description": "The file extension to be used for style files.", "type": "string" }, "poll": { + "description": "How often to check for file updates.", "type": "number" }, "class": { + "description": "Options for generating a class", "type": "object", "properties": { "spec": { + "description": "Specifies if a spec file is generated.", "type": "boolean", "default": false } } }, "component": { + "description": "Options for generating a component.", "type": "object", "properties": { "flat": { + "description": "Flag to indicate if a dir is created.", "type": "boolean", "default": false }, "spec": { + "description": "Specifies if a spec file is generated.", "type": "boolean", "default": true }, "inlineStyle": { + "description": "Specifies if the style will be in the ts file.", "type": "boolean", "default": false }, "inlineTemplate": { + "description": "Specifies if the template will be in the ts file.", "type": "boolean", "default": false }, "viewEncapsulation": { + "description": "Specifies the view encapsulation strategy.", "enum": ["Emulated", "Native", "None"] }, "changeDetection": { + "description": "Specifies the change detection strategy.", "enum": ["Default", "OnPush"] } } }, "directive": { + "description": "Options for generating a directive.", "type": "object", "properties": { "flat": { + "description": "Flag to indicate if a dir is created.", "type": "boolean", "default": true }, "spec": { + "description": "Specifies if a spec file is generated.", "type": "boolean", "default": true } } }, "interface": { + "description": "Options for generating an interface.", "type": "object", "properties": { "prefix": { + "description": "Prefix to apply to interface names. (i.e. I)", "type": "string", "default": "" } } }, "module": { + "description": "Options for generating a module.", "type": "object", "properties": { "flat": { + "description": "Flag to indicate if a dir is created.", "type": "boolean", "default": false }, "spec": { + "description": "Specifies if a spec file is generated.", "type": "boolean", "default": false } } }, "pipe": { + "description": "Options for generating a pipe.", "type": "object", "properties": { "flat": { + "description": "Flag to indicate if a dir is created.", "type": "boolean", "default": true }, "spec": { + "description": "Specifies if a spec file is generated.", "type": "boolean", "default": true } } }, "service": { + "description": "Options for generating a service.", "type": "object", "properties": { "flat": { + "description": "Flag to indicate if a dir is created.", "type": "boolean", "default": true }, "spec": { + "description": "Specifies if a spec file is generated.", "type": "boolean", "default": true } @@ -395,9 +422,10 @@ "additionalProperties": false }, "packageManager": { - "enum": [ "npm", "cnpm", "yarn", "default" ], - "default": "default", - "type": "string" + "description": "Specify which package manager tool to use.", + "enum": [ "npm", "cnpm", "yarn", "default" ], + "default": "default", + "type": "string" }, "warnings": { "description": "Allow people to disable console warnings.",