-
Notifications
You must be signed in to change notification settings - Fork 12k
Docs preview #12837
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
Changes from all commits
fa00d50
d039c8a
239a217
d779ff0
3c39525
beed643
c6d296a
5d11853
001609a
035fadf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 ( |
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should add a link? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
} | ||
} | ||
|
@@ -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", | ||
|
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. |
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`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor edit: |
||
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] | ||
``` |
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.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
@@ -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" ] | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
@@ -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.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe just delete "bare bones" entirely? |
||
"type": "boolean", | ||
"default": false | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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": { | ||
|
@@ -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": "" | ||
} | ||
}, | ||
|
There was a problem hiding this comment.
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/