Skip to content

Commit 8c3a7b8

Browse files
sumitarorafilipesilva
authored andcommitted
docs(@angular/cli): Adding more details to documentation (angular#4960)
1 parent 34c33b9 commit 8c3a7b8

17 files changed

+151
-124
lines changed

docs/documentation/build.md

+26-16
Original file line numberDiff line numberDiff line change
@@ -65,36 +65,46 @@ All builds make use of bundling, and using the `--prod` flag in `ng build --pro
6565
or `ng serve --prod` will also make use of uglifying and tree-shaking functionality.
6666

6767
## Options
68-
`--watch` (`-w`) rebuild when files change
68+
`--aot` Build using Ahead of Time compilation.
6969

70-
`--target` (`-t`) define the build target
70+
`--app` Specifies app name or index to use.
7171

72-
`--environment` (`-e`) defines the build environment
72+
`--base-href` (`-bh`) Base url for the application being built.
7373

74-
`--prod` flag to set build target and environment to production
74+
`--deploy-url` (`-d`) URL where files will be deployed.
7575

76-
`--dev` flag to set build target and environment to development
76+
`--dev` Build target and environment to development.
7777

7878
`--output-path` (`-op`) path where output will be placed
7979

80-
`--aot` flag whether to build using Ahead of Time compilation
80+
`--environment` (`-e`) Defines the build environment.
8181

82-
`--sourcemap` (`-sm`) output sourcemaps
82+
`--extract-css` (`-ec`) Extract css from global styles onto css files instead of js ones.
8383

84-
`--vendor-chunk` (`-vb`) use a separate bundle containing only vendor libraries
84+
`--i18n-file` Localization file to use for i18n.
8585

86-
`--base-href` (`-bh`) base url for the application being built
86+
`--i18n-format` Format of the localization file specified with --i18n-file.
8787

88-
`--deploy-url` (`-d`) url where files will be deployed
88+
`--locale` Locale to use for i18n.
8989

90-
`--verbose` (`-v`) adds more details to output logging
90+
`--output-hashing` Define the output filename cache-busting hashing mode.
9191

92-
`--progress` (`-pr`) log progress to the console while building
92+
`--output-path` (`-op`) Path where output will be placed.
9393

94-
`--extract-css` (`-ec`) extract css from global styles onto css files instead of js ones
94+
`--poll` Enable and define the file watching poll time period (milliseconds).
9595

96-
`--output-hashing` define the output filename cache-busting hashing mode
96+
`--prod` Build target and environment to production.
9797

98-
`--stats-json` generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or https://webpack.github.io/analyse
98+
`--progress` (`-pr`) Log progress to the console while building.
9999

100-
`--poll` enable and define the file watching poll time period (milliseconds)
100+
`--sourcemap` (`-sm`) Output sourcemaps.
101+
102+
`--stats-json` Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or https://webpack.github.io/analyse.
103+
104+
`--target` (`-t`) Defines the build target.
105+
106+
`--vendor-chunk` (`-vb`) Use a separate bundle containing only vendor libraries.
107+
108+
`--verbose` (`-v`) Adds more details to output logging.
109+
110+
`--watch` (`-w`) Run build when files change.

docs/documentation/config.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
<!-- Links in /docs/documentation should NOT have `.md` at the end, because they end up in our wiki at release. -->
22

3-
`ng get`
4-
`ng set`
3+
# ng get
4+
5+
## Overview
6+
`ng get [key]` Get a value from the configuration.
7+
8+
## Options
9+
`--global` Get the value in the global configuration (in your home directory).
10+
11+
12+
# ng set
13+
14+
## Overview
15+
`ng set [key]=[value]` Set a value in the configuration.
16+
17+
## Options
18+
`--global` Set the value in the global configuration rather than in your project's.

docs/documentation/doc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# ng doc
44

55
## Overview
6-
`ng doc [search term]` searches documentation on [angular.io](https://angular.io)
6+
`ng doc [search term]` Opens the official Angular documentation for a given keyword on [angular.io](https://angular.io).

docs/documentation/e2e.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ End-to-end tests are run via [Protractor](https://angular.github.io/protractor/)
1616
## Options
1717
`--config` (`-c`) use a specific config file. Defaults to the protractor config file in `.angular-cli.json`.
1818

19-
`--specs` (`-sp`) override specs in the protractor config.
20-
Can send in multiple specs by repeating flag (`ng e2e --specs=spec1.ts --specs=spec2.ts`).
19+
`--element-explorer` (`-ee`) Start Protractor's [Element Explorer](https://github.com/angular/protractor/blob/master/docs/debugging.md#testing-out-protractor-interactively) for debugging.
2120

22-
`--element-explorer` (`-ee`) start Protractor's
23-
[Element Explorer](https://github.com/angular/protractor/blob/master/docs/debugging.md#testing-out-protractor-interactively)
24-
for debugging.
21+
`--serve` 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.
2522

26-
`--webdriver-update` (`-wu`) try to update webdriver.
23+
`--specs` Override specs in the protractor config. Can send in multiple specs by repeating flag (ng e2e --specs=spec1.ts --specs=spec2.ts).
2724

28-
`--serve` (`-s`) compile and serve the app.
29-
All non-reload related serve options are also available (e.g. `--port=4400`).
25+
`--webdriver-update` (`-wu`) (Default: true) Try to update webdriver.

docs/documentation/generate/class.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
`ng generate class [name]` generates a class
77

88
## Options
9-
`--spec` specifies if a spec file is generated
9+
`--app` Specifies app name or index to use.
10+
11+
`--spec` Specifies if a spec file is generated.

docs/documentation/generate/component.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,24 @@
66
`ng generate component [name]` generates a component
77

88
## Options
9-
`--flat` flag to indicate if a dir is created
9+
`--app` Specifies app name or index to use.
1010

11-
`--inline-template` (`-it`) specifies if the template will be in the ts file
11+
`--change-detection` (`-cd`) Specifies the change detection strategy.
1212

13-
`--inline-style` (`-is`) specifies if the style will be in the ts file
13+
`--flat` Flag to indicate if a dir is created.
1414

15-
`--prefix` specifies whether to use the prefix
15+
`--export` Specifies if declaring module exports the component.
1616

17-
`--spec` specifies if a spec file is generated
17+
`--inline-style` (`-is`) Specifies if the style will be in the ts file.
1818

19-
`--view-encapsulation` (`-ve`) specifies the view encapsulation strategy
19+
`--inline-template` (`-it`) Specifies if the template will be in the ts file.
2020

21-
`--change-detection` (`-cd`) specifies the change detection strategy
21+
`--module` (`-m`) Allows specification of the declaring module.
2222

23-
`--skip-import` allows for skipping the module import
23+
`--prefix` Specifies whether to use the prefix.
2424

25-
`--module` (`-m`) allows specification of the declaring module
25+
`--skip-import` Allows for skipping the module import.
2626

27-
`--export` specifies if declaring module exports the component
27+
`--spec` Specifies if a spec file is generated.
28+
29+
`--view-encapsulation` (`-ve`) Specifies the view encapsulation strategy.

docs/documentation/generate/directive.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
`ng generate directive [name]` generates a directive
77

88
## Options
9-
`--flat` flag to indicate if a dir is created
9+
`--app` Specifies app name or index to use.
1010

11-
`--prefix` specifies whether to use the prefix
11+
`--export` Specifies if declaring module exports the component.
1212

13-
`--spec` specifies if a spec file is generated
13+
`--flat` Flag to indicate if a dir is created.
1414

15-
`--skip-import` allows for skipping the module import
15+
`--module` (`-m`) Allows specification of the declaring module.
1616

17-
`--module` (`-m`) allows specification of the declaring module
17+
`--prefix` Specifies whether to use the prefix.
1818

19-
`--export` specifies if declaring module exports the directive
19+
`--skip-import` Allows for skipping the module import.
20+
21+
`--spec` Specifies if a spec file is generated.

docs/documentation/generate/enum.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44

55
## Overview
66
`ng generate enum [name]` generates an enumeration
7+
8+
## Options
9+
`--app` Specifies app name or index to use.

docs/documentation/generate/guard.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
`ng generate guard [name]` generates a guard
55

66
## Options
7-
`--flat` flag to indicate if a dir is created
7+
`--app` Specifies app name or index to use.
88

9-
`--spec` specifies if a spec file is generated
9+
`--flat` Indicate if a dir is created.
1010

11-
`--module` (`-m`) allows specification of the declaring module
11+
`--module` (`-m`) Allows specification of the declaring module.
12+
13+
`--spec` Specifies if a spec file is generated.

docs/documentation/generate/interface.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
## Overview
66
`ng generate interface [name] <type>` generates an interface
77

8-
## Arguments
8+
## Options
9+
`--app` Specifies app name or index to use.
910

10-
`type` optional string to specify the type of interface
11+
`type` Pptional String to specify the type of interface.

docs/documentation/generate/module.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
`ng generate module [name]` generates an NgModule
77

88
## Options
9+
`--app` Specifies app name or index to use.
910

10-
`--flat` flag to indicate if a dir is created
11+
`--flat` Flag to indicate if a dir is created.
1112

12-
`--spec` specifies if a spec file is generated
13+
`--spec` Specifies if a spec file is generated.
1314

14-
`--routing` specifies if a routing module file should be generated
15+
`--routing` Specifies if a routing module file should be generated.

docs/documentation/generate/pipe.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
`ng generate pipe [name]` generates a pipe
77

88
## Options
9-
`--flat` flag to indicate if a dir is created
9+
`--app` Specifies app name or index to use.
1010

11-
`--spec` specifies if a spec file is generated
11+
`--export` Specifies if declaring module exports the pipe.
1212

13-
`--skip-import` allows for skipping the module import
13+
`--flat` Flag to indicate if a dir is created.
1414

15-
`--module` (`-m`) allows specification of the declaring module
15+
`--module` (`-m`) Allows specification of the declaring module.
1616

17-
`--export` specifies if declaring module exports the pipe
17+
`--skip-import` Allows for skipping the module import.
18+
19+
`--spec` Specifies if a spec file is generated.

docs/documentation/generate/service.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
`ng generate service [name]` generates a service
77

88
## Options
9-
`--flat` flag to indicate if a dir is created
9+
`--app` Specifies app name or index to use.
1010

11-
`--spec` specifies if a spec file is generated
11+
`--flat` Flag to indicate if a dir is created.
1212

13-
`--module` (`-m`) allows specification of the declaring module
13+
`--module` (`-m`) Allows specification of the declaring module.
14+
15+
`--spec` Specifies if a spec file is generated.

docs/documentation/lint.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
## Options
99

10-
`--fix` will attempt to fix lint errors
10+
`--fix` Fixes linting errors (may overwrite linted files).
1111

12-
`--force` will always return error code 0 even with lint errors
12+
`--force` Succeeds even if there was linting errors.
1313

14-
`--format` (`-t`) the output formatter to use
14+
`--format` (`-t`) Output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist).

docs/documentation/new.md

+20-10
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,32 @@
88
Default applications are created in a directory of the same name, with an initialized Angular application.
99

1010
## Options
11-
`--dry-run` (`-d`) run through without making any changes
11+
`--directory` (`-dir`) The directory name to create the app in.
1212

13-
`--skip-install` (`-si`) skip installing packages
13+
`--dry-run` (`-d`) Run through without making any changes.
1414

15-
`--skip-git` (`-sg`) skip initializing a git repository
15+
`--inline-style` (`is`) Should have an inline style.
1616

17-
`--directory` (`-dir`) the directory name to create the app in
17+
`--inline-template` (`it`) Should have an inline template.
1818

19-
`--source-dir` (`-sd`) the name of the source directory
19+
`--link-cli` Automatically link the `@angular/cli` package.
2020

21-
`--style` the style file default extension
21+
`--ng4` Create a project with Angular 4 in the template.
2222

23-
`--prefix` (`p`) the prefix to use for all component selectors
23+
`--prefix` (`p`) The prefix to use for all component selectors.
2424

25-
`--routing` flag to indicate whether to generate a routing module
25+
`--routing` Generate a routing module.
2626

27-
`--inline-style` (`is`) flag to indicate if the app component should have an inline style
27+
`--skip-commit` Skip committing the first commit to git.
2828

29-
`--inline-template` (`it`) flag to indicate if the app component should have an inline template
29+
`--skip-git` (`-sg`) Skip initializing a git repository.
30+
31+
`--skip-install` (`-si`) Skip installing packages.
32+
33+
`--skip-tests` Skip creating spec files.
34+
35+
`--source-dir` (`-sd`) The name of the source directory.
36+
37+
`--style` The style file default extension.
38+
39+
`--verbose` Adds more details to output logging.

docs/documentation/serve.md

+11-43
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,23 @@
55
## Overview
66
`ng serve` builds the application and starts a web server
77

8-
## Options
9-
`--watch` (`-w`) rebuild when files change
10-
11-
`--port` (`-p`) port to serve the application on
12-
13-
`--host` (`-H`) host where to listen
14-
15-
`--proxy-config` (`-pc`) proxy configuration file
16-
17-
`--live-reload` (`-lr`) flag to turn off live reloading
18-
19-
`--live-reload-client` specify the URL that the live reload browser client will use
20-
21-
`--ssl` flag to turn on SSL
22-
23-
`--ssl-key` path to the SSL key
24-
25-
`--ssl-cert` path to the SSL cert
8+
All the build Options are available in serve below are the additional options.
269

27-
`--open` (`-o`) opens the app in the default browser
28-
29-
`--hmr` use hot module reload
30-
31-
`--target` (`-t`) define the build target
32-
33-
`--environment` (`-e`) defines the build environment
34-
35-
`--prod` flag to set build target and environment to production
36-
37-
`--dev` flag to set build target and environment to development
38-
39-
`--output-path` (`-po`) path where output will be placed
40-
41-
`--aot` flag whether to build using Ahead of Time compilation
42-
43-
`--sourcemap` (`-sm`) output sourcemaps
10+
## Options
11+
`--host` (`-H`) Listens only on localhost by default.
4412

45-
`--vendor-chunk` (`-vb`) use a separate bundle containing only vendor libraries
13+
`--hmr` Enable hot module replacement.
4614

47-
`--base-href` (`-bh`) base url for the application being built
15+
`--live-reload` (`-lr`) Whether to reload the page on change, using live-reload.
4816

49-
`--deploy-url` (`-d`) url where files will be deployed
17+
`--live-reload-client` Specify the URL that the live reload browser client will use.
5018

51-
`--verbose` (`-v`) adds more details to output logging
19+
`--open` (`-o`) Opens the url in default browser.
5220

53-
`--progress` (`-pr`) log progress to the console while building
21+
`--port` (`-p`) Port to listen to for serving.
5422

55-
`--extract-css` (`-ec`) extract css from global styles onto css files instead of js ones
23+
`--ssl` Serve using HTTPS.
5624

57-
`--output-hashing` define the output filename cache-busting hashing mode
25+
`--ssl-cert` SSL certificate to use for serving HTTPS.
5826

59-
`--poll` enable and define the file watching poll time period (milliseconds)
27+
`--ssl-key` SSL key to use for serving HTTPS.

0 commit comments

Comments
 (0)