Skip to content
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

Docs preview #12837

Closed
wants to merge 10 commits into from
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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: Looks like "webpack" uses lowercase for themselves: https://webpack.js.org/concepts/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: Comma thing. Could be misread as 3 things. Maybe this: "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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a link?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new page just landed - adding link here, and another one in config.

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.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor edit period instead of comma: 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`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor edit: 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.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: Architect in caps everywhere? (I don't have a pref. This is the only lowercase i noticed so far)

"$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
Empty file.
12 changes: 7 additions & 5 deletions packages/schematics/angular/app-shell/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"id": "SchematicsAngularAppShell",
"title": "Angular AppShell Options Schema",
"type": "object",
"description": "Generates an app shell for running a server-side version of an app.",
"long-description": "",
"properties": {
"clientProject": {
"type": "string",
"description": "Name of related client app."
"description": "The name of the related client app."
},
"universalProject": {
"type": "string",
"description": "Name of related universal app."
"description": "The name of related Universal app."
},
"route": {
"type": "string",
Expand All @@ -20,12 +22,12 @@
"name": {
"type": "string",
"format": "html-selector",
"description": "Name of the universal app"
"description": "The HTML selector of the Universal app"
},
"appId": {
"type": "string",
"format": "html-selector",
"description": "The appId to use withServerTransition.",
"description": "The app ID to use in withServerTransition().",
"default": "serverApp"
},
"outDir": {
Expand All @@ -43,7 +45,7 @@
"index": {
"type": "string",
"format": "path",
"description": "Name of the index file",
"description": "The name of the index file",
"default": "index.html"
},
"main": {
Expand Down
25 changes: 13 additions & 12 deletions packages/schematics/angular/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"id": "SchematicsAngularApp",
"title": "Angular Application Options Schema",
"type": "object",
"description": "Generates a new basic app definition in the \"projects\" subfolder of the workspace.",
"properties": {
"projectRoot": {
"description": "The root directory of the new application.",
"description": "The root directory of the new app.",
"type": "string",
"visible": false
},
"name": {
"description": "The name of the application.",
"description": "The name of the new app.",
"type": "string",
"$default": {
"$source": "argv",
Expand All @@ -19,57 +20,57 @@
"x-prompt": "What name would you like to use for the application?"
},
"experimentalIvy": {
"description": "EXPERIMENTAL: Specifies whether to create a new application which uses the Ivy rendering engine.",
"description": "EXPERIMENTAL: True to create a new app that uses the Ivy rendering engine.",
"type": "boolean",
"default": false
},
"inlineStyle": {
"description": "Specifies if the style will be in the ts file.",
"description": "When true, includes styles inline in the root component TS file. Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root component TS file.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe .ts file? Maybe component.ts file? I looked at some of the other doc for template syntax and components. They use just "component file" or a filename, but I like where you're headed clarifying that it's the typescript file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying "root component.ts file", but can't do code font in the short desc - does it still work?

"type": "boolean",
"default": false,
"alias": "s"
},
"inlineTemplate": {
"description": "Specifies if the template will be in the ts file.",
"description": "When true, includes template inline in the root component TS file. Default is false, meaning that an external template file is created and referenced in the root component TS file. ",
"type": "boolean",
"default": false,
"alias": "t"
},
"viewEncapsulation": {
"description": "Specifies the view encapsulation strategy.",
"description": "The view encapsulation strategy to use in the new app.",
"enum": ["Emulated", "Native", "None", "ShadowDom"],
"type": "string"
},
"routing": {
"type": "boolean",
"description": "Generates a routing module.",
"description": "When true, creates a routing NgModule.",
"default": false
},
"prefix": {
"type": "string",
"format": "html-selector",
"description": "The prefix to apply to generated selectors.",
"description": "A prefix to apply to generated selectors.",
"default": "app",
"alias": "p"
},
"style": {
"description": "The file extension to be used for style files.",
"description": "The file extension to use for style files.",
"type": "string",
"default": "css"
},
"skipTests": {
"description": "Skip creating spec files.",
"description": "When true, does not create \"spec.ts\" test files for the app.",
"type": "boolean",
"default": false,
"alias": "S"
},
"skipPackageJson": {
"type": "boolean",
"default": false,
"description": "Do not add dependencies to package.json."
"description": "When true, does not add dependencies to the \"package.json\" file."
},
"minimal": {
"description": "Create a barebones project without any testing frameworks",
"description": "When true, creates a bare-bones project without any testing frameworks.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just delete "bare bones" entirely?

"type": "boolean",
"default": false
},
Expand Down
9 changes: 5 additions & 4 deletions packages/schematics/angular/class/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"id": "SchematicsAngularClass",
"title": "Angular Class Options Schema",
"type": "object",
"description": "Creates a new generic class definition in the given or default project.",
"properties": {
"name": {
"type": "string",
"description": "The name of the class.",
"description": "The name of the new class.",
"$default": {
"$source": "argv",
"index": 0
Expand All @@ -16,7 +17,7 @@
"path": {
"type": "string",
"format": "path",
"description": "The path to create the class.",
"description": "The path at which to create the class, relative to the workspace root.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm...."The folder in which to create.."? "The path for the folder in which to create.."? (ditto hmmm on other similar phrases below)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be "The path to the directory in which to create...", which is pretty unwieldy. They seem to prefer directory to folder, and Google author's style guide prefers directory in reference, folder in guides and ui.

"visible": false
},
"project": {
Expand All @@ -28,12 +29,12 @@
},
"spec": {
"type": "boolean",
"description": "Specifies if a spec file is generated.",
"description": "When true, generates a \"spec.ts\" test file for the new class.",
"default": false
},
"type": {
"type": "string",
"description": "Specifies the type of class.",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
"default": ""
}
},
Expand Down