Skip to content

Edit and expand command docs #12741

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 12 additions & 1 deletion packages/angular/cli/commands/build-long.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Uses the Webpack build tool, with default configuration options specified in the workspace configuration file, `angular.json`, or with a named alternative configuration.
A "production" configuration is created by default when you use the CLI to create the project, and you can use that configuration by specifying the `--prod` option.

The configuration options generally correspond to the command options.
You can override individual configuration defaults by specifying the corresponding options on the command line.
The command can accept option names given in either dash-case or camelCase.
Note that in the configuration file, you must specify names in camelCase.

Some additional options can only be set through the configuration file,
either by direct editing or with the `ng config` command.
These include `assets`, `styles`, and `scripts` objects that provide runtime-global resources to include in the project.
Resources in CSS, such as images and fonts, are automatically written and fingerprinted at the root of the output folder.

Uses the Webpack build tool, with environment and build options specified in the CLI configuration file.
For further details, see Workspace Configuration.
2 changes: 1 addition & 1 deletion packages/angular/cli/commands/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/schema",
"$id": "ng-cli://commands/config.json",
"description": "Retrieves or sets Angular configuration values.",
"description": "Retrieves or sets Angular configuration values in the angular.json file for the workspace.",
"$longDescription": "",

"$aliases": [],
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/cli/commands/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
}
},
"configuration": {
"description": "A named configuration environment, as specified in the \"configurations\" section of angular.json.",
"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.",
"type": "string",
"aliases": [
"c"
]
},
"prod": {
"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.",
"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.",
"type": "boolean"
}
}
Expand All @@ -42,13 +42,13 @@
"type": "boolean",
"default": false,
"aliases": [ "d" ],
"description": "When true, run through and report activity without writing out results."
"description": "When true, runs through and reports activity without writing out results."
},
"force": {
"type": "boolean",
"default": false,
"aliases": [ "f" ],
"description": "When true, force overwriting of existing files."
"description": "When true, forces overwriting of existing files."
},
"interactive": {
"type": "boolean",
Expand Down
4 changes: 3 additions & 1 deletion packages/angular/cli/commands/lint-long.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Takes the name of the project, as specified in the `projects` section of the `angular.json` workspace configuration file.
When a project name is not supplied, uses the configured `defaultProject` of the workspace.
When a project name is not supplied, uses the configured `defaultProject` of the workspace.

The default linting tool is [TSLint](https://palantir.github.io/tslint/), and the default configuration is specified in the project's `tslint.json` file.
2 changes: 1 addition & 1 deletion packages/angular/cli/commands/lint.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"configuration": {
"description": "Specify the configuration to use.",
"description": "The linting configuration to use.",
"type": "string",
"aliases": [
"c"
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/cli/commands/new.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"collection": {
"type": "string",
"aliases": [ "c" ],
"description": "Schematics collection to use."
"description": "A collection of schematics to use in generating the initial app."
},
"verbose": {
"type": "boolean",
"default": false,
"aliases": [ "v" ],
"description": "Adds more details to output logging."
"description": "When true, adds more details to output logging."
}
},
"required": []
Expand Down
16 changes: 16 additions & 0 deletions packages/angular/cli/commands/run-long.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Architect is the tool that the CLI uses to perform complex tasks such as compilation, according to provided configurations.
The CLI commands run Architect targets such as `build`, `serve`, `test` and `lint`.
Each named target has a default configuration, specified by an "options" object,
and an optional set of named alternate configurations in the "configurations" object.

For example, the "server" target for a newly generated app has a predefined
alternate configuration named "production".

You can define new targets and their configuration options in the "architect" section
of the `angular.json` file.
If you do so, you can run them from the command line using the `ng run` command.
Execute the command using the following format.

```
ng run project:target[:configuration]
```
8 changes: 4 additions & 4 deletions packages/angular/cli/commands/run.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "http://json-schema.org/schema",
"$id": "ng-cli://commands/run.json",
"description": "Runs a custom target defined in your project.",
"$longDescription": "",
"description": "Runs an architect target with an optional custom builder configuration defined in your project.",
"$longDescription": "./run-long.md",

"$aliases": [],
"$scope": "in",
Expand All @@ -15,14 +15,14 @@
"properties": {
"target": {
"type": "string",
"description": "The target to run.",
"description": "The Architect target to run.",
"$default": {
"$source": "argv",
"index": 0
}
},
"configuration": {
"description": "Specify the configuration to use.",
"description": "A named builder configuration, defined in the \"configurations\" section of angular.json.\nThe builder uses the named configuration to run the given target.",
"type": "string",
"aliases": [ "c" ]
}
Expand Down