Skip to content

Commit fd12092

Browse files
Broccohansl
authored andcommitted
docs: update the build command docs
1 parent 8b7a6af commit fd12092

2 files changed

Lines changed: 204 additions & 45 deletions

File tree

docs/documentation/build.md

Lines changed: 202 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -65,46 +65,205 @@ All builds make use of bundling, and using the `--prod` flag in `ng build --pro
6565
or `ng serve --prod` will also make use of uglifying and tree-shaking functionality.
6666

6767
## Options
68-
`--aot` Build using Ahead of Time compilation.
69-
70-
`--app` Specifies app name or index to use.
71-
72-
`--base-href` (`-bh`) Base url for the application being built.
73-
74-
`--deploy-url` (`-d`) URL where files will be deployed.
75-
76-
`--dev` Build target and environment to development.
77-
78-
`--output-path` (`-op`) path where output will be placed
79-
80-
`--environment` (`-e`) Defines the build environment.
81-
82-
`--extract-css` (`-ec`) Extract css from global styles onto css files instead of js ones.
83-
84-
`--i18n-file` Localization file to use for i18n.
85-
86-
`--i18n-format` Format of the localization file specified with --i18n-file.
87-
88-
`--locale` Locale to use for i18n.
89-
90-
`--output-hashing` Define the output filename cache-busting hashing mode.
91-
92-
`--output-path` (`-op`) Path where output will be placed.
93-
94-
`--poll` Enable and define the file watching poll time period (milliseconds).
95-
96-
`--prod` Build target and environment to production.
97-
98-
`--progress` (`-pr`) Log progress to the console while building.
99-
100-
`--sourcemap` (`-sm`) Output sourcemaps.
101-
102-
`--stats-json` Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or https://webpack.github.io/analyse.
103-
104-
`--target` (`-t`) Defines the build target.
105-
106-
`--vendor-chunk` (`-vc`) Use a separate bundle containing only vendor libraries.
107-
108-
`--verbose` (`-v`) Adds more details to output logging.
109-
110-
`--watch` (`-w`) Run build when files change.
68+
<details>
69+
<summary>aot</summary>
70+
<p>
71+
`--aot` _default: false_
72+
</p>
73+
<p>
74+
Build using Ahead of Time compilation.
75+
</p>
76+
</details>
77+
78+
<details>
79+
<summary>app</summary>
80+
<p>
81+
`--app` (aliases: `-a`)
82+
</p>
83+
<p>
84+
Specifies app name or index to use.
85+
</p>
86+
</details>
87+
88+
<details>
89+
<summary>base-href</summary>
90+
<p>
91+
`--base-href` (aliases: `-bh`)
92+
</p>
93+
<p>
94+
Base url for the application being built.
95+
</p>
96+
</details>
97+
98+
<details>
99+
<summary>deploy-url</summary>
100+
<p>
101+
`--deploy-url` (aliases: `-d`)
102+
</p>
103+
<p>
104+
URL where files will be deployed.
105+
</p>
106+
</details>
107+
108+
<details>
109+
<summary>output-path</summary>
110+
<p>
111+
`--output-path` (aliases: `-op`)
112+
</p>
113+
<p>
114+
Path where output will be placed
115+
</p>
116+
</details>
117+
118+
<details>
119+
<summary>environment</summary>
120+
<p>
121+
`--environment` (aliases: `-e`)
122+
</p>
123+
<p>
124+
Defines the build environment.
125+
</p>
126+
</details>
127+
128+
<details>
129+
<summary>extract-css</summary>
130+
<p>
131+
`--extract-css` (aliases: `-ec`)
132+
</p>
133+
<p>
134+
Extract css from global styles onto css files instead of js ones.
135+
</p>
136+
</details>
137+
138+
<details>
139+
<summary>i18n-file</summary>
140+
<p>
141+
`--i18n-file`
142+
</p>
143+
<p>
144+
Localization file to use for i18n.
145+
</p>
146+
</details>
147+
148+
<details>
149+
<summary>i18n-format</summary>
150+
<p>
151+
`--i18n-format`
152+
</p>
153+
<p>
154+
Format of the localization file specified with --i18n-file.
155+
</p>
156+
</details>
157+
158+
<details>
159+
<summary>locale</summary>
160+
<p>
161+
`--locale`
162+
</p>
163+
<p>
164+
Locale to use for i18n.
165+
</p>
166+
</details>
167+
168+
<details>
169+
<summary>output-hashing</summary>
170+
<p>
171+
`--output-hashing` (aliases: `-oh`)
172+
</p>
173+
<p>
174+
Define the output filename cache-busting hashing mode.
175+
</p>
176+
<p>
177+
Values: `none`, `all`, `media`, `bundles`
178+
</p>
179+
</details>
180+
181+
<details>
182+
<summary>output-path</summary>
183+
<p>
184+
`--output-path` (aliases: `-op`)
185+
</p>
186+
<p>
187+
Path where output will be placed.
188+
</p>
189+
</details>
190+
191+
<details>
192+
<summary>poll</summary>
193+
<p>
194+
`--poll`
195+
</p>
196+
<p>
197+
Enable and define the file watching poll time period (milliseconds).
198+
</p>
199+
</details>
200+
201+
<details>
202+
<summary>progress</summary>
203+
<p>
204+
`--progress` (aliases: `-pr`) _default value: true_
205+
</p>
206+
<p>
207+
Log progress to the console while building.
208+
</p>
209+
</details>
210+
211+
<details>
212+
<summary>sourcemap</summary>
213+
<p>
214+
`--sourcemap` (aliases: `-sm`, `sourcemaps`)
215+
</p>
216+
<p>
217+
Output sourcemaps.
218+
</p>
219+
</details>
220+
221+
<details>
222+
<summary>stats-json</summary>
223+
<p>
224+
`--stats-json` (aliases: `-`)
225+
</p>
226+
<p>
227+
Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or https://webpack.github.io/analyse.
228+
</p>
229+
</details>
230+
231+
<details>
232+
<summary>target</summary>
233+
<p>
234+
`--target` (aliases: `-t`, `-dev`, `-prod`) _default value: development_
235+
</p>
236+
<p>
237+
Defines the build target.
238+
</p>
239+
</details>
240+
241+
<details>
242+
<summary>vendor-chunk</summary>
243+
<p>
244+
`--vendor-chunk` (aliases: `-vc`) _default value: true_
245+
</p>
246+
<p>
247+
Use a separate bundle containing only vendor libraries.
248+
</p>
249+
</details>
250+
251+
<details>
252+
<summary>verbose</summary>
253+
<p>
254+
`--verbose` (aliases: `-v`) _default value: false_
255+
</p>
256+
<p>
257+
Adds more details to output logging.
258+
</p>
259+
</details>
260+
261+
<details>
262+
<summary>watch</summary>
263+
<p>
264+
`--watch` (aliases: `-w`)
265+
</p>
266+
<p>
267+
Run build when files change.
268+
</p>
269+
</details>

packages/@angular/cli/commands/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const baseBuildCommandOptions: any = [
117117
name: 'app',
118118
type: String,
119119
aliases: ['a'],
120-
description: 'Specifies app name to use.'
120+
description: 'Specifies app name or index to use.'
121121
}
122122
];
123123

@@ -135,7 +135,7 @@ const BuildCommand = Command.extend({
135135
name: 'stats-json',
136136
type: Boolean,
137137
default: false,
138-
description: oneLine`Generates a \`stats.json\` file which can be analyzed using tools
138+
description: oneLine`Generates a \`stats.json\` file which can be analyzed using tools
139139
such as: \`webpack-bundle-analyzer\` or https://webpack.github.io/analyse.`
140140
}
141141
]),

0 commit comments

Comments
 (0)