diff --git a/docs/documentation/new.md b/docs/documentation/new.md index e3e66addf12d..9400ce2ef5e2 100644 --- a/docs/documentation/new.md +++ b/docs/documentation/new.md @@ -24,7 +24,7 @@ Default applications are created in a directory of the same name, with an initia --dry-run (alias: -d) default value: false

- Run through without making any changes. + Run through without making any changes. Will list all files that would have been created when running ng new.

@@ -66,6 +66,9 @@ Default applications are created in a directory of the same name, with an initia

The prefix to use for all component selectors.

+

+ You can later change the value in .angular-cli.json (apps[0].prefix). +

@@ -129,6 +132,9 @@ Default applications are created in a directory of the same name, with an initia

The name of the source directory.

+

+ You can later change the value in .angular-cli.json (apps[0].root). +

@@ -136,8 +142,18 @@ Default applications are created in a directory of the same name, with an initia

--style default value: css

-

- The style file default extension. +

+ The style file default extension. Possible values: + +
+

+ You can later change the value in .angular-cli.json (defaults.styleExt).

diff --git a/packages/@angular/cli/commands/new.ts b/packages/@angular/cli/commands/new.ts index 5f2647f95102..b4f61766613b 100644 --- a/packages/@angular/cli/commands/new.ts +++ b/packages/@angular/cli/commands/new.ts @@ -13,6 +13,8 @@ const Project = require('../ember-cli/lib/models/project'); const SilentError = require('silent-error'); const mkdir = denodeify(fs.mkdir); +const configFile = '.angular-cli.json'; +const changeLater = (path: string) => `You can later change the value in "${configFile}" (${path})`; const NewCommand = Command.extend({ name: 'new', @@ -26,7 +28,10 @@ const NewCommand = Command.extend({ type: Boolean, default: false, aliases: ['d'], - description: 'Run through without making any changes.' + description: oneLine` + Run through without making any changes. + Will list all files that would have been created when running "ng new". + ` }, { name: 'verbose', @@ -82,20 +87,26 @@ const NewCommand = Command.extend({ type: String, default: 'src', aliases: ['sd'], - description: 'The name of the source directory.' + description: `The name of the source directory. ${changeLater('apps[0].root')}.` }, { name: 'style', type: String, default: 'css', - description: 'The style file default extension.' + description: oneLine`The style file default extension. + Possible values: css, scss, less, sass, styl(stylus). + ${changeLater('defaults.styleExt')}. + ` }, { name: 'prefix', type: String, default: 'app', aliases: ['p'], - description: 'The prefix to use for all component selectors.' + description: oneLine` + The prefix to use for all component selectors. + ${changeLater('apps[0].prefix')}. + ` }, { name: 'routing',