forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.json
More file actions
273 lines (273 loc) Β· 10.4 KB
/
build.json
File metadata and controls
273 lines (273 loc) Β· 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
{
"name": "build",
"command": "ng build [project]",
"shortDescription": "Compiles an Angular application or library into an output directory named dist/ at the given output path.",
"longDescriptionRelativePath": "@angular/cli/src/commands/build/long-description.md",
"longDescription": "The command can be used to build a project of type \"application\" or \"library\".\nWhen used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, `poll` and `watch` options are applied.\nAll other options apply only to building applications.\n\nThe application builder uses the [esbuild](https://esbuild.github.io/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.\nA \"development\" configuration is created by default when you use the CLI to create the project, and you can use that configuration by specifying the `--configuration development`.\n\nThe configuration options generally correspond to the command options.\nYou can override individual configuration defaults by specifying the corresponding options on the command line.\nThe command can accept option names given in dash-case.\nNote that in the configuration file, you must specify names in camelCase.\n\nSome additional options can only be set through the configuration file,\neither by direct editing or with the `ng config` command.\nThese include `assets`, `styles`, and `scripts` objects that provide runtime-global resources to include in the project.\nResources in CSS, such as images and fonts, are automatically written and fingerprinted at the root of the output folder.\n\nFor further details, see [Workspace Configuration](reference/configs/workspace-config).\n",
"aliases": [
"b"
],
"deprecated": false,
"options": [
{
"name": "allowed-common-js-dependencies",
"type": "array",
"description": "A list of CommonJS or AMD packages that are allowed to be used without a build time warning. Use `'*'` to allow all."
},
{
"name": "aot",
"type": "boolean",
"default": true,
"description": "Build using Ahead of Time compilation."
},
{
"name": "app-shell",
"type": "boolean",
"default": false,
"description": "Generates an application shell during build time."
},
{
"name": "base-href",
"type": "string",
"description": "Base url for the application being built."
},
{
"name": "browser",
"type": "string",
"description": "The full path for the browser entry point to the application, relative to the current workspace."
},
{
"name": "clear-screen",
"type": "boolean",
"default": false,
"description": "Automatically clear the terminal screen during rebuilds."
},
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.dev/reference/configs/workspace-config#alternate-build-configurations."
},
{
"name": "cross-origin",
"type": "string",
"default": "none",
"enum": [
"none",
"anonymous",
"use-credentials"
],
"description": "Define the crossorigin attribute setting of elements that provide CORS support."
},
{
"name": "define",
"type": "array",
"description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced."
},
{
"name": "define",
"type": "string",
"description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced."
},
{
"name": "delete-output-path",
"type": "boolean",
"default": true,
"description": "Delete the output path before building."
},
{
"name": "deploy-url",
"type": "string",
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
},
{
"name": "external-dependencies",
"type": "array",
"description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime."
},
{
"name": "extract-licenses",
"type": "boolean",
"default": true,
"description": "Extract all licenses in a separate file."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "i18n-duplicate-translation",
"type": "string",
"default": "warning",
"enum": [
"warning",
"error",
"ignore"
],
"description": "How to handle duplicate translations for i18n."
},
{
"name": "i18n-missing-translation",
"type": "string",
"default": "warning",
"enum": [
"warning",
"error",
"ignore"
],
"description": "How to handle missing translations for i18n."
},
{
"name": "index",
"type": "string",
"description": "Configures the generation of the application's HTML index."
},
{
"name": "inline-style-language",
"type": "string",
"default": "css",
"enum": [
"css",
"less",
"sass",
"scss"
],
"description": "The stylesheet language to use for the application's inline component styles."
},
{
"name": "localize",
"type": "boolean",
"description": "Translate the bundles in one or more locales."
},
{
"name": "named-chunks",
"type": "boolean",
"default": false,
"description": "Use file name for lazy loaded chunks."
},
{
"name": "optimization",
"type": "boolean",
"default": true,
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration."
},
{
"name": "output-hashing",
"type": "string",
"default": "none",
"enum": [
"none",
"all",
"media",
"bundles"
],
"description": "Define the output filename cache-busting hashing mode."
},
{
"name": "output-mode",
"type": "string",
"enum": [
"static",
"server"
],
"description": "Defines the build output target. 'static': Generates a static site for deployment on any static hosting service. 'server': Produces an application designed for deployment on a server that supports server-side rendering (SSR)."
},
{
"name": "output-path",
"type": "string",
"description": "Specify the output path relative to workspace root."
},
{
"name": "poll",
"type": "number",
"description": "Enable and define the file watching poll time period in milliseconds."
},
{
"name": "polyfills",
"type": "array",
"description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'."
},
{
"name": "prerender",
"type": "boolean",
"default": false,
"description": "Prerender (SSG) pages of your application during build time."
},
{
"name": "preserve-symlinks",
"type": "boolean",
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
},
{
"name": "progress",
"type": "boolean",
"default": true,
"description": "Log progress to the console while building."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
},
{
"name": "server",
"type": "string",
"description": "The full path for the server entry point to the application, relative to the current workspace."
},
{
"name": "service-worker",
"type": "string",
"description": "Generates a service worker configuration."
},
{
"name": "source-map",
"type": "boolean",
"default": false,
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration."
},
{
"name": "ssr",
"type": "boolean",
"default": false,
"description": "Server side render (SSR) pages of your application during runtime."
},
{
"name": "stats-json",
"type": "boolean",
"default": false,
"description": "Generates a 'stats.json' file which can be analyzed with https://esbuild.github.io/analyze/."
},
{
"name": "subresource-integrity",
"type": "boolean",
"default": false,
"description": "Enables the use of subresource integrity validation."
},
{
"name": "ts-config",
"type": "string",
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
},
{
"name": "verbose",
"type": "boolean",
"default": false,
"description": "Adds more details to output logging."
},
{
"name": "watch",
"type": "boolean",
"default": false,
"description": "Run build when files change."
},
{
"name": "web-worker-ts-config",
"type": "string",
"description": "TypeScript configuration for Web Worker modules."
}
]
}