diff --git a/docs/documentation/build.md b/docs/documentation/build.md index 3cbdc64d9916..afafb1ac2905 100644 --- a/docs/documentation/build.md +++ b/docs/documentation/build.md @@ -68,7 +68,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional
aot

- `--aot` _default: false_ + --aot default value: false

Build using Ahead of Time compilation. @@ -78,7 +78,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

app

- `--app` (aliases: `-a`) + --app (aliases: -a)

Specifies app name or index to use. @@ -88,7 +88,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

base-href

- `--base-href` (aliases: `-bh`) + --base-href (aliases: -bh)

Base url for the application being built. @@ -98,7 +98,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

deploy-url

- `--deploy-url` (aliases: `-d`) + --deploy-url (aliases: -d)

URL where files will be deployed. @@ -108,7 +108,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

output-path

- `--output-path` (aliases: `-op`) + --output-path (aliases: -op)

Path where output will be placed @@ -118,7 +118,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

environment

- `--environment` (aliases: `-e`) + --environment (aliases: -e)

Defines the build environment. @@ -128,7 +128,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

extract-css

- `--extract-css` (aliases: `-ec`) + --extract-css (aliases: -ec)

Extract css from global styles onto css files instead of js ones. @@ -138,7 +138,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

i18n-file

- `--i18n-file` + --i18n-file

Localization file to use for i18n. @@ -148,7 +148,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

i18n-format

- `--i18n-format` + --i18n-format

Format of the localization file specified with --i18n-file. @@ -158,7 +158,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

locale

- `--locale` + --locale

Locale to use for i18n. @@ -168,20 +168,20 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

output-hashing

- `--output-hashing` (aliases: `-oh`) + --output-hashing (aliases: -oh)

Define the output filename cache-busting hashing mode.

- Values: `none`, `all`, `media`, `bundles` + Values: none, all, media, bundles

output-path

- `--output-path` (aliases: `-op`) + --output-path (aliases: -op)

Path where output will be placed. @@ -191,7 +191,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

poll

- `--poll` + --poll

Enable and define the file watching poll time period (milliseconds). @@ -201,7 +201,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

progress

- `--progress` (aliases: `-pr`) _default value: true_ + --progress (aliases: -pr) default value: true

Log progress to the console while building. @@ -211,7 +211,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

sourcemap

- `--sourcemap` (aliases: `-sm`, `sourcemaps`) + --sourcemap (aliases: -sm, sourcemaps)

Output sourcemaps. @@ -221,17 +221,17 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

stats-json

- `--stats-json` (aliases: `-`) + --stats-json

- Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or https://webpack.github.io/analyse. + Generates a stats.json file which can be analyzed using tools such as: webpack-bundle-analyzer or https://webpack.github.io/analyse.

target

- `--target` (aliases: `-t`, `-dev`, `-prod`) _default value: development_ + --target (aliases: -t, -dev, -prod) default value: development

Defines the build target. @@ -241,7 +241,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

vendor-chunk

- `--vendor-chunk` (aliases: `-vc`) _default value: true_ + --vendor-chunk (aliases: -vc) default value: true

Use a separate bundle containing only vendor libraries. @@ -251,7 +251,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

verbose

- `--verbose` (aliases: `-v`) _default value: false_ + --verbose (aliases: -v) default value: false

Adds more details to output logging. @@ -261,7 +261,7 @@ or `ng serve --prod` will also make use of uglifying and tree-shaking functional

watch

- `--watch` (aliases: `-w`) + --watch (aliases: -w)

Run build when files change. diff --git a/docs/documentation/config.md b/docs/documentation/config.md index 04bea65a9fe8..7cad423de2c5 100644 --- a/docs/documentation/config.md +++ b/docs/documentation/config.md @@ -9,7 +9,7 @@

global

- `--global` _default value: false_ + --global default value: false

Get the value in the global configuration (in your home directory). @@ -26,7 +26,7 @@

global

- `--global` _default value: false_ + --global default value: false

Get the value in the global configuration (in your home directory). diff --git a/docs/documentation/e2e.md b/docs/documentation/e2e.md index 9cefa3f3aa39..84b21fd14c36 100644 --- a/docs/documentation/e2e.md +++ b/docs/documentation/e2e.md @@ -17,7 +17,7 @@ End-to-end tests are run via [Protractor] (https://angular.github.io/protractor/

config

- `--config` (alias: `-c`) + --config (aliases: -c)

Use a specific config file. Defaults to the protractor config file in `.angular-cli.json`. @@ -27,7 +27,7 @@ End-to-end tests are run via [Protractor] (https://angular.github.io/protractor/

element-explorer

- `--element-explorer` (alias: `-ee`) _default value: false_ + --element-explorer (aliases: -ee) default value: false

Start Protractor's [Element Explorer](https://github.com/angular/protractor/blob/master/docs/debugging.md#testing-out-protractor-interactively) for debugging. @@ -37,7 +37,7 @@ End-to-end tests are run via [Protractor] (https://angular.github.io/protractor/

serve

- `--serve` (alias: `-s`) _default value: true_ + --serve (aliases: -s) default value: true

Compile and Serve the app. All serve options are also available. The live-reload option defaults to false, and the default port will be random. @@ -47,7 +47,7 @@ End-to-end tests are run via [Protractor] (https://angular.github.io/protractor/

specs

- `--specs` (alias: `-sp`) _default value: []_ + --specs (aliases: -sp) default value: []

Override specs in the protractor config. Can send in multiple specs by repeating flag (ng e2e --specs=spec1.ts --specs=spec2.ts). @@ -57,7 +57,7 @@ End-to-end tests are run via [Protractor] (https://angular.github.io/protractor/

webdrive-update

- `--webdrive-update` (alias: `-wu`) _default value: true_ + --webdrive-update (aliases: -wu) default value: true

Try to update webdriver. diff --git a/docs/documentation/eject.md b/docs/documentation/eject.md index cde17cfefc97..eba0b0ff8a61 100644 --- a/docs/documentation/eject.md +++ b/docs/documentation/eject.md @@ -15,7 +15,7 @@ ng eject

aot

- `--aot` + --aot

Build using Ahead of Time compilation. @@ -25,7 +25,7 @@ ng eject

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -35,7 +35,7 @@ ng eject

base-href

- `--base-href` (alias: `-bh`) + --base-href (aliases: -bh)

Base url for the application being built. @@ -45,7 +45,7 @@ ng eject

deploy-url

- `--deploy-url` (alias: `-d`) + --deploy-url (aliases: -d)

URL where files will be deployed. @@ -55,7 +55,7 @@ ng eject

environment

- `--environment` (alias: `-e`) + --environment (aliases: -e)

Defines the build environment. @@ -65,7 +65,7 @@ ng eject

extract-css

- `--extract-css` (alias: `-ec`) + --extract-css (aliases: -ec)

Extract css from global styles onto css files instead of js ones. @@ -75,7 +75,7 @@ ng eject

force

- `--force` _default value: false_ + --force default value: false

Overwrite any webpack.config.js and npm scripts already existing. @@ -85,7 +85,7 @@ ng eject

i18n-file

- `--i18n-file` + --i18n-file

Localization file to use for i18n. @@ -95,7 +95,7 @@ ng eject

i18n-format

- `--i18n-format` + --i18n-format

Format of the localization file specified with --i18n-file. @@ -105,7 +105,7 @@ ng eject

locale

- `--locale` + --locale

Locale to use for i18n. @@ -115,17 +115,17 @@ ng eject

output-hashing

- `--output-hashing` (alias: `-oh`) _default value: _ + --output-hashing (aliases: -oh) default value:

- Define the output filename cache-busting hashing mode. Possible values: `none`, `all`, `media`, `bundles` + Define the output filename cache-busting hashing mode. Possible values: none, all, media, bundles

output-path

- `--output-path` (alias: `-op`) _default value: _ + --output-path (aliases: -op) default value:

Path where output will be placed. @@ -135,7 +135,7 @@ ng eject

poll

- `--poll` + --poll

Enable and define the file watching poll time period (milliseconds) . @@ -145,7 +145,7 @@ ng eject

progress

- `--progress` (alias: `-pr`) _default value: true_ + --progress (aliases: -pr) default value: true

Log progress to the console while building. @@ -155,7 +155,7 @@ ng eject

sourcemap

- `--sourcemap` (alias: `-sm`, `sourcemaps`) + --sourcemap (aliases: -sm, sourcemaps)

Output sourcemaps. @@ -165,7 +165,7 @@ ng eject

target

- `--target` (aliases: `-t`, `-dev`, `-prod`) _default value: development_ + --target (aliases: -t, -dev, -prod) default value: development

Defines the build target. @@ -175,7 +175,7 @@ ng eject

vendor-chunk

- `--vendor-chunk` (aliases: `-vc`) _default value: true_ + --vendor-chunk (aliases: -vc) default value: true

Use a separate bundle containing only vendor libraries. @@ -185,7 +185,7 @@ ng eject

verbose

- `--verbose` (aliases: `-v`) _default value: false_ + --verbose (aliases: -v) default value: false

Adds more details to output logging. @@ -195,7 +195,7 @@ ng eject

watch

- `--watch` (aliases: `-w`) + --watch (aliases: -w)

Run build when files change. diff --git a/docs/documentation/generate/class.md b/docs/documentation/generate/class.md index 942b7c0b8e5c..e1ccd6f5c1b0 100644 --- a/docs/documentation/generate/class.md +++ b/docs/documentation/generate/class.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -19,7 +19,7 @@

spec

- `--spec` + --spec

Specifies if a spec file is generated. diff --git a/docs/documentation/generate/component.md b/docs/documentation/generate/component.md index 3661e8f1a858..12ce166e1de8 100644 --- a/docs/documentation/generate/component.md +++ b/docs/documentation/generate/component.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -19,7 +19,7 @@

change-detection

- `--change-detection` (alias: `-cd`) + --change-detection (aliases: -cd)

Specifies the change detection strategy. @@ -29,7 +29,7 @@

flat

- `--flat` _default value: false_ + --flat default value: false

Flag to indicate if a dir is created. @@ -39,7 +39,7 @@

export

- `--export` (alias: `-`) _default value: false_ + --export default value: false

Specifies if declaring module exports the component. @@ -49,7 +49,7 @@

inline-style

- `--inline-style` (alias: `-is`) _default value: false_ + --inline-style (aliases: -is) default value: false

Specifies if the style will be in the ts file. @@ -59,7 +59,7 @@

inline-template

- `--inline-template` (alias: `-it`) _default value: false_ + --inline-template (aliases: -it) default value: false

Specifies if the template will be in the ts file. @@ -69,7 +69,7 @@

module

- `--module` (alias: `-m`) + --module (aliases: -m)

Allows specification of the declaring module's file name (e.g `app.module.ts`). @@ -79,7 +79,7 @@

prefix

- `--prefix` + --prefix

Specifies whether to use the prefix. @@ -89,7 +89,7 @@

skip-import

- `--skip-import` _default value: false_ + --skip-import default value: false

Allows for skipping the module import. @@ -99,7 +99,7 @@

spec

- `--spec` + --spec

Specifies if a spec file is generated. @@ -109,7 +109,7 @@

view-encapsulation

- `--view-encapsulation` (alias: `-ve`) + --view-encapsulation (aliases: -ve)

Specifies the view encapsulation strategy. diff --git a/docs/documentation/generate/directive.md b/docs/documentation/generate/directive.md index 90ecfadba7bc..9ed8f37046c7 100644 --- a/docs/documentation/generate/directive.md +++ b/docs/documentation/generate/directive.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -19,7 +19,7 @@

export

- `--export` _default value: false_ + --export default value: false

Specifies if declaring module exports the component. @@ -29,7 +29,7 @@

flat

- `--flat` + --flat

Flag to indicate if a dir is created. @@ -39,7 +39,7 @@

module

- `--module` (alias: `-m`) + --module (aliases: -m)

Allows specification of the declaring module. @@ -49,7 +49,7 @@

prefix

- `--prefix` + --prefix

Specifies whether to use the prefix. @@ -59,7 +59,7 @@

skip-import

- `--skip-import` + --skip-import

Allows for skipping the module import. @@ -69,7 +69,7 @@

spec

- `--spec` + --spec

Specifies if a spec file is generated. diff --git a/docs/documentation/generate/enum.md b/docs/documentation/generate/enum.md index 54e8a6bb3463..c7b4b66ff19f 100644 --- a/docs/documentation/generate/enum.md +++ b/docs/documentation/generate/enum.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. diff --git a/docs/documentation/generate/guard.md b/docs/documentation/generate/guard.md index d1b9c2d8f90d..3435dd172f66 100644 --- a/docs/documentation/generate/guard.md +++ b/docs/documentation/generate/guard.md @@ -7,7 +7,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -17,7 +17,7 @@

flat

- `--flat` + --flat

Indicate if a dir is created. @@ -27,7 +27,7 @@

module

- `--module` (alias: `-m`) + --module (aliases: -m)

Specifies where the guard should be provided. @@ -37,7 +37,7 @@

spec

- `--spec` + --spec

Specifies if a spec file is generated. diff --git a/docs/documentation/generate/interface.md b/docs/documentation/generate/interface.md index 38d8f19947e8..8aa09de4ca76 100644 --- a/docs/documentation/generate/interface.md +++ b/docs/documentation/generate/interface.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. diff --git a/docs/documentation/generate/module.md b/docs/documentation/generate/module.md index eb64482f070c..24a4fe95a3af 100644 --- a/docs/documentation/generate/module.md +++ b/docs/documentation/generate/module.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -19,7 +19,7 @@

flat

- `--flat` + --flat

Flag to indicate if a dir is created. @@ -29,7 +29,7 @@

spec

- `--spec` + --spec

Specifies if a spec file is generated. @@ -39,7 +39,7 @@

routing

- `--routing` + --routing

Specifies if a routing module file should be generated. diff --git a/docs/documentation/generate/pipe.md b/docs/documentation/generate/pipe.md index d39f15a81607..b8ee09497f3a 100644 --- a/docs/documentation/generate/pipe.md +++ b/docs/documentation/generate/pipe.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -19,7 +19,7 @@

export

- `--export` + --export

Specifies if declaring module exports the pipe. @@ -29,7 +29,7 @@

flat

- `--flat` + --flat

Flag to indicate if a dir is created. @@ -39,7 +39,7 @@

module

- `--module` (alias: `-m`) + --module (aliases: -m)

Allows specification of the declaring module. @@ -49,7 +49,7 @@

skip-import

- `--skip-import` + --skip-import

Allows for skipping the module import. @@ -59,7 +59,7 @@

spec

- `--spec` + --spec

Specifies if a spec file is generated. diff --git a/docs/documentation/generate/service.md b/docs/documentation/generate/service.md index c048fac75072..eb94f5c5b9bc 100644 --- a/docs/documentation/generate/service.md +++ b/docs/documentation/generate/service.md @@ -9,7 +9,7 @@

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name to use. @@ -19,7 +19,7 @@

flat

- `--flat` + --flat

Flag to indicate if a dir is created. @@ -29,7 +29,7 @@

module

- `--module` (alias: `-m`) + --module (aliases: -m)

Specifies where the service should be provided. @@ -39,7 +39,7 @@

spec

- `--spec` + --spec

Specifies if a spec file is generated. diff --git a/docs/documentation/lint.md b/docs/documentation/lint.md index 814d072fd695..95d94bb5b73d 100644 --- a/docs/documentation/lint.md +++ b/docs/documentation/lint.md @@ -9,7 +9,7 @@

fix

- `--fix` _default value: false_ + --fix default value: false

Fixes linting errors (may overwrite linted files). @@ -19,7 +19,7 @@

force

- `--force` _default value: false_ + --force default value: false

Succeeds even if there was linting errors. @@ -29,7 +29,7 @@

type-check

- `--type-check` _default value: false_ + --type-check default value: false

Controls the type check for linting. @@ -39,7 +39,7 @@

format

- `--format` (alias: `-t`) _default value: prose_ + --format (aliases: -t) default value: prose

Output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist). diff --git a/docs/documentation/new.md b/docs/documentation/new.md index 886577ee8fb0..15121fff3c96 100644 --- a/docs/documentation/new.md +++ b/docs/documentation/new.md @@ -11,7 +11,7 @@ Default applications are created in a directory of the same name, with an initia

directory

- `--directory` (alias: `-dir`) _default value: dir_ + --directory (aliases: -dir) default value: dir

The directory name to create the app in. @@ -21,7 +21,7 @@ Default applications are created in a directory of the same name, with an initia

dry-run

- `--dry-run` (alias: `-d`) _default value: false_ + --dry-run (aliases: -d) default value: false

Run through without making any changes. @@ -31,7 +31,7 @@ Default applications are created in a directory of the same name, with an initia

inline-style

- `--inline-style` (alias: `-is`) _default value: false_ + --inline-style (aliases: -is) default value: false

Should have an inline style. @@ -41,7 +41,7 @@ Default applications are created in a directory of the same name, with an initia

inline-template

- `--inline-template` (alias: `-it`) _default value: false_ + --inline-template (aliases: -it) default value: false

Should have an inline template. @@ -51,7 +51,7 @@ Default applications are created in a directory of the same name, with an initia

prefix

- `--prefix` (alias: `-p`) _default value: app_ + --prefix (aliases: -p) default value: app

The prefix to use for all component selectors. @@ -61,7 +61,7 @@ Default applications are created in a directory of the same name, with an initia

routing

- `--routing` _default value: false_ + --routing default value: false

Generate a routing module. @@ -71,7 +71,7 @@ Default applications are created in a directory of the same name, with an initia

skip-commit

- `--skip-commit` (alias: `-sc`) _default value: false_ + --skip-commit (aliases: -sc) default value: false

Skip committing the first commit to git. @@ -81,7 +81,7 @@ Default applications are created in a directory of the same name, with an initia

skip-git

- `--skip-git` (alias: `-sg`) _default value: false_ + --skip-git (aliases: -sg) default value: false

Skip initializing a git repository. @@ -91,7 +91,7 @@ Default applications are created in a directory of the same name, with an initia

skip-install

- `--skip-install` (alias: `-si`) _default value: false_ + --skip-install (aliases: -si) default value: false

Skip installing packages. @@ -101,17 +101,27 @@ Default applications are created in a directory of the same name, with an initia

skip-tests

- `--skip-tests` (alias: `-st`) _default value: false_ + --skip-tests (aliases: -st) default value: false

Skip creating spec files.

+
+ skip-e2e +

+ `--skip-e2e` (alias: `-se`) _default value: false_ +

+

+ Skip including e2e functionality. +

+
+
source-dir

- `--source-dir` (alias: `-sd`) _default value: src_ + --source-dir (aliases: -sd) default value: src

The name of the source directory. @@ -121,7 +131,7 @@ Default applications are created in a directory of the same name, with an initia

style

- `--style` _default value: css_ + --style default value: css

The style file default extension. @@ -131,7 +141,7 @@ Default applications are created in a directory of the same name, with an initia

verbose

- `--verbose` (alias: `-v`) _default value: false_ + --verbose (aliases: -v) default value: false

Adds more details to output logging. diff --git a/docs/documentation/serve.md b/docs/documentation/serve.md index acfb9dd00d7c..0de32c40c72e 100644 --- a/docs/documentation/serve.md +++ b/docs/documentation/serve.md @@ -11,7 +11,7 @@ All the build Options are available in serve, below are the additional options.

host

- `--host` (alias: `-H`) _default value: localhost_ + --host (aliases: -H) default value: localhost

Listens only on localhost by default. @@ -21,7 +21,7 @@ All the build Options are available in serve, below are the additional options.

hmr

- `--hmr` _default value: false_ + --hmr default value: false

Enable hot module replacement. @@ -31,7 +31,7 @@ All the build Options are available in serve, below are the additional options.

live-reload

- `--live-reload` (alias: `-lr`) _default value: true_ + --live-reload (aliases: -lr) default value: true

Whether to reload the page on change, using live-reload. @@ -41,7 +41,7 @@ All the build Options are available in serve, below are the additional options.

live-reload-client

- `--live-reload-client` + --live-reload-client

Specify the URL that the live reload browser client will use. @@ -51,7 +51,7 @@ All the build Options are available in serve, below are the additional options.

open

- `--open` (alias: `-o`) _default value: false_ + --open (aliases: -o) default value: false

Opens the url in default browser. @@ -61,7 +61,7 @@ All the build Options are available in serve, below are the additional options.

port

- `--port` (alias: `-p`) _default value: 4200_ + --port (aliases: -p) default value: 4200

Port to listen to for serving. @@ -71,7 +71,7 @@ All the build Options are available in serve, below are the additional options.

ssl

- `--ssl` + --ssl

Serve using HTTPS. @@ -81,7 +81,7 @@ All the build Options are available in serve, below are the additional options.

ssl-cert

- `--ssl-cert` (alias: `-`) _default value: _ + --ssl-cert (aliases: -) default value:

SSL certificate to use for serving HTTPS. @@ -91,7 +91,7 @@ All the build Options are available in serve, below are the additional options.

ssl-key

- `--ssl-key` + --ssl-key

SSL key to use for serving HTTPS. @@ -101,7 +101,7 @@ All the build Options are available in serve, below are the additional options.

aot

- `--aot` + --aot

Build using Ahead of Time compilation. @@ -111,7 +111,7 @@ All the build Options are available in serve, below are the additional options.

base-href

- `--base-href` (alias: `-bh`) + --base-href (aliases: -bh)

Base url for the application being built. @@ -121,7 +121,7 @@ All the build Options are available in serve, below are the additional options.

deploy-url

- `--deploy-url` (alias: `-d`) + --deploy-url (aliases: -d)

URL where files will be deployed. @@ -131,7 +131,7 @@ All the build Options are available in serve, below are the additional options.

environment

- `--environment` (alias: `-e`) + --environment (aliases: -e)

Defines the build environment. @@ -141,7 +141,7 @@ All the build Options are available in serve, below are the additional options.

extract-css

- `--extract-css` (alias: `-ec`) + --extract-css (aliases: -ec)

Extract css from global styles onto css files instead of js ones. @@ -151,7 +151,7 @@ All the build Options are available in serve, below are the additional options.

i18n-file

- `--i18n-file` + --i18n-file

Localization file to use for i18n. @@ -161,7 +161,7 @@ All the build Options are available in serve, below are the additional options.

i18n-format

- `--i18n-format` + --i18n-format

Format of the localization file specified with --i18n-file. @@ -171,7 +171,7 @@ All the build Options are available in serve, below are the additional options.

locale

- `--locale` + --locale

Locale to use for i18n. @@ -181,17 +181,17 @@ All the build Options are available in serve, below are the additional options.

output-hashing

- `--output-hashing` (alias: `-oh`) _default value: _ + --output-hashing (aliases: -oh) default value:

- Define the output filename cache-busting hashing mode. Possible values: `none`, `all`, `media`, `bundles` + Define the output filename cache-busting hashing mode. Possible values: none, all, media, bundles

output-path

- `--output-path` (alias: `-op`) _default value: _ + --output-path (aliases: -op) default value:

Path where output will be placed. @@ -201,7 +201,7 @@ All the build Options are available in serve, below are the additional options.

poll

- `--poll` + --poll

Enable and define the file watching poll time period (milliseconds) . @@ -211,7 +211,7 @@ All the build Options are available in serve, below are the additional options.

progress

- `--progress` (alias: `-pr`) _default value: true_ + --progress (aliases: -pr) default value: true

Log progress to the console while building. @@ -221,7 +221,7 @@ All the build Options are available in serve, below are the additional options.

sourcemap

- `--sourcemap` (alias: `-sm`, `sourcemaps`) + --sourcemap (aliases: -sm, sourcemaps)

Output sourcemaps. @@ -231,7 +231,7 @@ All the build Options are available in serve, below are the additional options.

target

- `--target` (aliases: `-t`, `-dev`, `-prod`) _default value: development_ + --target (aliases: -t, -dev, -prod) default value: development

Defines the build target. @@ -241,7 +241,7 @@ All the build Options are available in serve, below are the additional options.

vendor-chunk

- `--vendor-chunk` (aliases: `-vc`) _default value: true_ + --vendor-chunk (aliases: -vc) default value: true

Use a separate bundle containing only vendor libraries. @@ -251,7 +251,7 @@ All the build Options are available in serve, below are the additional options.

verbose

- `--verbose` (aliases: `-v`) _default value: false_ + --verbose (aliases: -v) default value: false

Adds more details to output logging. @@ -261,7 +261,7 @@ All the build Options are available in serve, below are the additional options.

watch

- `--watch` (aliases: `-w`) + --watch (aliases: -w)

Run build when files change. diff --git a/docs/documentation/test.md b/docs/documentation/test.md index f03c23b713e1..dacf81a5960f 100644 --- a/docs/documentation/test.md +++ b/docs/documentation/test.md @@ -19,7 +19,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

app

- `--app` (alias: `-a`) _default value: 1st app_ + --app (aliases: -a) default value: 1st app

Specifies app name or index to use. @@ -29,7 +29,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

browsers

- `--browsers` + --browsers

Override which browsers tests are run against. @@ -39,7 +39,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

code-coverage

- `--code-coverage` (alias: `-cc`) _default value: false_ + --code-coverage (aliases: -cc) default value: false

Coverage report will be in the coverage/ directory. @@ -49,7 +49,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

colors

- `--colors` + --colors

Enable or disable colors in the output (reporters and logs). @@ -59,7 +59,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

config

- `--config` (alias: `-c`) + --config (aliases: -c)

Use a specific config file. Defaults to the protractor config file in angular-cli.json. @@ -69,7 +69,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

log-level

- `--log-level` + --log-level

Level of logging. @@ -79,7 +79,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

poll

- `--poll` + --poll

Enable and define the file watching poll time period (milliseconds). @@ -89,7 +89,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

port

- `--port` + --port

Port where the web server will be listening. @@ -99,7 +99,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

progress

- `--progress` _default value: true_ + --progress default value: true

Log progress to the console while in progress. @@ -109,7 +109,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

reporters

- `--reporters` + --reporters

List of reporters to use. @@ -119,7 +119,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

single-run

- `--single-run` (alias: `-sr`) _default value: false_ + --single-run (aliases: -sr) default value: false

Run tests a single time. @@ -129,7 +129,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

sourcemap

- `--sourcemap` (alias: `-sm`, `sourcemaps`) + --sourcemap (aliases: -sm, sourcemaps)

Output sourcemaps. @@ -139,7 +139,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will

watch

- `--watch` (aliases: `-w`) + --watch (aliases: -w)

Run build when files change. diff --git a/docs/documentation/xi18n.md b/docs/documentation/xi18n.md index 1e3fe3fbb200..0a350c9b9853 100644 --- a/docs/documentation/xi18n.md +++ b/docs/documentation/xi18n.md @@ -6,16 +6,72 @@ `ng xi18n` Extracts i18n messages from the templates. ## Options -`--app` (`-a`) Specifies app name to use. +

+ app +

+ --app (aliases: -a) default value: 1st app +

+

+ Specifies app name to use. +

+
-`--i18n-format` (`-f`) Output format for the generated file: either `xmb` or `xlf`. +
+ i18n-format +

+ --i18n-format (aliases: -f) +

+

+ Output format for the generated file: either `xmb` or `xlf`. +

+
-`--locale` (`-l`) Specifies the source language of the application. +
+ locale +

+ --locale (aliases: -l) +

+

+ Specifies the source language of the application. +

+
-`--outfile` (`-of`) Name of the file to output. +
+ outfile +

+ --outfile (aliases: -of) +

+

+ Name of the file to output. +

+
-`--output-path` (`-op`) Path where output will be placed. +
+ output-path +

+ --output-path (aliases: -op) +

+

+ Path where output will be placed. +

+
-`--progress` Log progress to the console while running. +
+ progress +

+ --progress +

+

+ Log progress to the console while running. +

+
-`--verbose` Adds more details to output logging. +
+ verbose +

+ --verbose +

+

+ Adds more details to output logging. +

+
diff --git a/packages/@angular/cli/blueprints/ng/files/package.json b/packages/@angular/cli/blueprints/ng/files/package.json index 810087dccb0f..b12fb3dbd234 100644 --- a/packages/@angular/cli/blueprints/ng/files/package.json +++ b/packages/@angular/cli/blueprints/ng/files/package.json @@ -37,9 +37,9 @@ "karma-cli": "~1.0.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", - "karma-coverage-istanbul-reporter": "^0.2.0", + "karma-coverage-istanbul-reporter": "^0.2.0",<% if(e2e) { %> "protractor": "~5.1.0", - "ts-node": "~2.0.0", + "ts-node": "~2.0.0",<% } %> "tslint": "~4.5.0", "typescript": "~2.2.0" } diff --git a/packages/@angular/cli/blueprints/ng/index.ts b/packages/@angular/cli/blueprints/ng/index.ts index 53516a38fe38..2fb760175ead 100644 --- a/packages/@angular/cli/blueprints/ng/index.ts +++ b/packages/@angular/cli/blueprints/ng/index.ts @@ -35,6 +35,7 @@ export default Blueprint.extend({ // set this.tests to opposite of skipTest options, // meaning if tests are being skipped then the default.spec.BLUEPRINT will be false this.tests = options.skipTests ? false : true; + this.e2e = options.skipE2e ? false : true; // Split/join with / not path.sep as reference to typings require forward slashes. const relativeRootPath = options.sourceDir.split('/').map(() => '..').join('/'); @@ -54,7 +55,8 @@ export default Blueprint.extend({ routing: options.routing, inlineStyle: options.inlineStyle, inlineTemplate: options.inlineTemplate, - tests: this.tests + tests: this.tests, + e2e: this.e2e, }; }, @@ -78,6 +80,13 @@ export default Blueprint.extend({ fileList = fileList.filter(p => p.indexOf('app.component.spec.ts') < 0); } + if (this.options && this.options.skipE2e) { + fileList = fileList + .filter(p => p.indexOf('protractor.conf.js') < 0) + .filter(p => p.indexOf('app.po.ts') < 0) + .filter(p => p.indexOf('app.e2e-spec.ts') < 0); + } + const cliConfig = CliConfig.fromProject(); const ngConfig = cliConfig && cliConfig.config; if (!ngConfig || ngConfig.packageManager != 'yarn') { diff --git a/packages/@angular/cli/commands/new.ts b/packages/@angular/cli/commands/new.ts index 18a3503a8edf..cdc6a8edd578 100644 --- a/packages/@angular/cli/commands/new.ts +++ b/packages/@angular/cli/commands/new.ts @@ -62,6 +62,13 @@ const NewCommand = Command.extend({ aliases: ['st'], description: 'Skip creating spec files.' }, + { + name: 'skip-e2e', + type: Boolean, + default: false, + aliases: ['s2'], + description: 'Skip creating e2e files.' + }, { name: 'skip-commit', type: Boolean, diff --git a/packages/@angular/cli/tasks/e2e.ts b/packages/@angular/cli/tasks/e2e.ts index 0fddde01d585..002be3f0f539 100644 --- a/packages/@angular/cli/tasks/e2e.ts +++ b/packages/@angular/cli/tasks/e2e.ts @@ -32,6 +32,8 @@ export const E2eTask = Task.extend({ hostname: e2eTaskOptions.host, port: e2eTaskOptions.port.toString() }); + } else if (e2eTaskOptions.baseHref) { + additionalProtractorConfig.baseUrl = e2eTaskOptions.baseHref; } if (e2eTaskOptions.specs.length !== 0) { diff --git a/packages/@angular/cli/tasks/init.ts b/packages/@angular/cli/tasks/init.ts index 1bd981a8bb12..742605e010b5 100644 --- a/packages/@angular/cli/tasks/init.ts +++ b/packages/@angular/cli/tasks/init.ts @@ -78,7 +78,8 @@ export default Task.extend({ inlineTemplate: commandOptions.inlineTemplate, ignoredUpdateFiles: ['favicon.ico'], skipGit: commandOptions.skipGit, - skipTests: commandOptions.skipTests + skipTests: commandOptions.skipTests, + skipE2e: commandOptions.skipE2e }; validateProjectName(packageName); diff --git a/tests/e2e/tests/commands/new/new-skip-e2e.ts b/tests/e2e/tests/commands/new/new-skip-e2e.ts new file mode 100644 index 000000000000..ee140c4016e2 --- /dev/null +++ b/tests/e2e/tests/commands/new/new-skip-e2e.ts @@ -0,0 +1,11 @@ +import {createProject} from '../../../utils/project'; +import {expectFileNotToExist} from '../../../utils/fs'; + + +export default function() { + return Promise.resolve() + .then(() => createProject('new-project-skip-e2e', '--skip-e2e')) + .then(() => expectFileNotToExist('e2e/app.e2e-spec.ts')) + .then(() => expectFileNotToExist('e2e/app.po.ts')) + .then(() => expectFileNotToExist('protractor.conf.js')); +} diff --git a/tests/e2e/tests/commands/new/new-skip-tests.ts b/tests/e2e/tests/commands/new/new-skip-tests.ts new file mode 100644 index 000000000000..95dde0a38e88 --- /dev/null +++ b/tests/e2e/tests/commands/new/new-skip-tests.ts @@ -0,0 +1,9 @@ +import {createProject} from '../../../utils/project'; +import {expectFileNotToExist} from '../../../utils/fs'; + + +export default function() { + return Promise.resolve() + .then(() => createProject('new-project-skip-tests', '--skip-tests')) + .then(() => expectFileNotToExist('src/app/app.component.spec.ts')); +} diff --git a/tests/e2e/tests/test/e2e-baseurl.ts b/tests/e2e/tests/test/e2e-baseurl.ts new file mode 100644 index 000000000000..02ccb97db4b3 --- /dev/null +++ b/tests/e2e/tests/test/e2e-baseurl.ts @@ -0,0 +1,20 @@ +import { ng, killAllProcesses } from '../../utils/process'; +import { expectToFail } from '../../utils/utils'; +import { ngServe } from '../../utils/project'; +import { updateJsonFile } from '../../utils/project'; + +export default function () { + return Promise.resolve() + .then(() => expectToFail(() => ng('e2e', '--no-serve'))) + .then(() => updateJsonFile('.angular-cli.json', configJson => { + const app = configJson.defaults; + app.serve = { port: 4400 }; + })) + .then(() => ngServe()) + .then(() => expectToFail(() => ng('e2e', '--no-serve'))) + .then(() => ng('e2e', '--no-serve', '--base-href=http://localhost:4400')) + .then(() => killAllProcesses(), (err: any) => { + killAllProcesses(); + throw err; + }); +} diff --git a/tests/e2e/utils/fs.ts b/tests/e2e/utils/fs.ts index 0a621f2c32fc..0ffba4787393 100644 --- a/tests/e2e/utils/fs.ts +++ b/tests/e2e/utils/fs.ts @@ -130,6 +130,18 @@ export function expectFileMatchToExist(dir: string, regex: RegExp) { }); } +export function expectFileNotToExist(fileName: string) { + return new Promise((resolve, reject) => { + fs.exists(fileName, (exist) => { + if (exist) { + reject(new Error(`File ${fileName} was expected not to exist but found...`)); + } else { + resolve(); + } + }); + }); +} + export function expectFileToExist(fileName: string) { return new Promise((resolve, reject) => { fs.exists(fileName, (exist) => {