Skip to content

Commit 4028b86

Browse files
jbogarthydekyliau
authored andcommitted
docs: differentiate lib build from app build
1 parent 81e1a28 commit 4028b86

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
Uses the [webpack](https://webpack.js.org/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.
2-
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.
1+
The command can be used to build a project of type "application" or "library".
2+
When used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, and `watch` options are applied.
3+
All other options apply only to building applications.
4+
5+
The application builder uses the [webpack](https://webpack.js.org/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.
6+
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 `--configuration="production"` or the `--prod="true"` option.
37

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

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

1418
For further details, see [Workspace Configuration](guide/workspace-config).

packages/angular_devkit/build_ng_packagr/src/build/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
},
1111
"tsConfig": {
1212
"type": "string",
13-
"description": "The file path of the TypeScript configuration file."
13+
"description": "The full path for the TypeScript configuration file, relative to the current workspace. Applies to both libraries and applications."
1414
},
1515
"watch": {
1616
"type": "boolean",
17-
"description": "Run build when files change.",
17+
"description": "Run build when files change. Applies to both libraries and applications.",
1818
"default": false
1919
}
2020
},

0 commit comments

Comments
 (0)