Skip to content

docs(@angular/cli): document available options & JSON schema #4767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 17, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/documentation/generate/component.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions docs/documentation/generate/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion packages/@angular/cli/blueprints/class/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
68 changes: 58 additions & 10 deletions packages/@angular/cli/blueprints/component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
39 changes: 33 additions & 6 deletions packages/@angular/cli/blueprints/directive/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
19 changes: 16 additions & 3 deletions packages/@angular/cli/blueprints/module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion packages/@angular/cli/blueprints/ng2/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "<%= htmlComponentName %>",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
33 changes: 28 additions & 5 deletions packages/@angular/cli/blueprints/pipe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 15 additions & 3 deletions packages/@angular/cli/blueprints/service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading