Skip to content

Commit fa00d50

Browse files
committed
docs: edit and expand command docs
1 parent f52f043 commit fa00d50

File tree

8 files changed

+33
-13
lines changed

8 files changed

+33
-13
lines changed
+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Uses the Webpack build tool, with default target environment and build options specified in the workspace configuration file, `angular.json`.
2+
3+
You can override the configuration defaults by specifying an option on the command line.
4+
The command can accept option names given in either dash-case or camelCase.
5+
Note that in the configuration file, you must specify names in camelCase.
6+
7+
The configuration options generally correspond to the command options.
8+
Some additional options can only be set through the configuration file,
9+
either by direct editing or with the `ng config` command.
10+
These include `assets`, `styles`, and `scripts` objects that provide runtime-global resources to include in the project.
111
Resources in CSS, such as images and fonts, are automatically written and fingerprinted at the root of the output folder.
212

3-
Uses the Webpack build tool, with environment and build options specified in the CLI configuration file.
13+
For further details, see Workspace Configuration.

packages/angular/cli/commands/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/schema",
33
"$id": "ng-cli://commands/config.json",
4-
"description": "Retrieves or sets Angular configuration values.",
4+
"description": "Retrieves or sets Angular configuration values in the angular.json file for the workspace.",
55
"$longDescription": "",
66

77
"$aliases": [],

packages/angular/cli/commands/definitions.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
}
1515
},
1616
"configuration": {
17-
"description": "A named configuration environment, as specified in the \"configurations\" section of angular.json.",
17+
"description": "A named build target, as specified in the \"configurations\" section of angular.json.\nEach named target is accompanied by a configuration of option defaults for that target.",
1818
"type": "string",
1919
"aliases": [
2020
"c"
2121
]
2222
},
2323
"prod": {
24-
"description": "When true, sets the build configuration to the production environment.\nAll builds make use of bundling and limited tree-shaking, A production build also runs limited dead code elimination using UglifyJS.",
24+
"description": "When true, sets the build configuration to the production target.\nAll builds make use of bundling and limited tree-shaking, A production build also runs limited dead code elimination using UglifyJS.",
2525
"type": "boolean"
2626
}
2727
}
@@ -42,13 +42,13 @@
4242
"type": "boolean",
4343
"default": false,
4444
"aliases": [ "d" ],
45-
"description": "When true, run through and report activity without writing out results."
45+
"description": "When true, runs through and reports activity without writing out results."
4646
},
4747
"force": {
4848
"type": "boolean",
4949
"default": false,
5050
"aliases": [ "f" ],
51-
"description": "When true, force overwriting of existing files."
51+
"description": "When true, forces overwriting of existing files."
5252
},
5353
"interactive": {
5454
"type": "boolean",
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
Takes the name of the project, as specified in the `projects` section of the `angular.json` workspace configuration file.
2-
When a project name is not supplied, uses the configured `defaultProject` of the workspace.
2+
When a project name is not supplied, uses the configured `defaultProject` of the workspace.
3+
4+
The default linting tool is [TSLint](https://palantir.github.io/tslint/), and the default configuration is specified in the project's `tslint.json` file.

packages/angular/cli/commands/lint.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
},
2424
"configuration": {
25-
"description": "Specify the configuration to use.",
25+
"description": "The linting configuration to use.",
2626
"type": "string",
2727
"aliases": [
2828
"c"

packages/angular/cli/commands/new.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"collection": {
1717
"type": "string",
1818
"aliases": [ "c" ],
19-
"description": "Schematics collection to use."
19+
"description": "A collection of schematics to use in generating the initial app."
2020
},
2121
"verbose": {
2222
"type": "boolean",
2323
"default": false,
2424
"aliases": [ "v" ],
25-
"description": "Adds more details to output logging."
25+
"description": "When true, adds more details to output logging."
2626
}
2727
},
2828
"required": []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Architect is the tool that the CLI uses to perform complex tasks such as compilation, according to provided configurations.
2+
The CLI commands run Architect targets such as `build`, `serve`, `test` and `lint`.
3+
Each named target has a default configuration, specified by an "options" object, and an optional set of named alternate configurations in the "configurations" object.
4+
For example, the "build" target for a newly generated app has a predefined alternate configuration named "production".
5+
6+
You can define new targets and their configuration options in the "architect" section of the `angular.json` file.
7+
If you do so, you can run them from the command line using the `ng run` command.
8+

packages/angular/cli/commands/run.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/schema",
33
"$id": "ng-cli://commands/run.json",
4-
"description": "Runs a custom target defined in your project.",
4+
"description": "Runs an architect target with a custom build configuration defined in your project.",
55
"$longDescription": "",
66

77
"$aliases": [],
@@ -15,14 +15,14 @@
1515
"properties": {
1616
"target": {
1717
"type": "string",
18-
"description": "The target to run.",
18+
"description": "The command to run.",
1919
"$default": {
2020
"$source": "argv",
2121
"index": 0
2222
}
2323
},
2424
"configuration": {
25-
"description": "Specify the configuration to use.",
25+
"description": "A named build configuration, defined in the \"configurations\" section of angular.json.\nThe build uses the configuration associated with the given target.",
2626
"type": "string",
2727
"aliases": [ "c" ]
2828
}

0 commit comments

Comments
 (0)