1 | /**
|
---|
2 | * Browser target options
|
---|
3 | */
|
---|
4 | export interface Schema {
|
---|
5 | /**
|
---|
6 | * A list of CommonJS packages that are allowed to be used without a build time warning.
|
---|
7 | */
|
---|
8 | allowedCommonJsDependencies?: string[];
|
---|
9 | /**
|
---|
10 | * Build using Ahead of Time compilation.
|
---|
11 | */
|
---|
12 | aot?: boolean;
|
---|
13 | /**
|
---|
14 | * List of static application assets.
|
---|
15 | */
|
---|
16 | assets?: AssetPattern[];
|
---|
17 | /**
|
---|
18 | * Base url for the application being built.
|
---|
19 | */
|
---|
20 | baseHref?: string;
|
---|
21 | /**
|
---|
22 | * Budget thresholds to ensure parts of your application stay within boundaries which you
|
---|
23 | * set.
|
---|
24 | */
|
---|
25 | budgets?: Budget[];
|
---|
26 | /**
|
---|
27 | * Enables '@angular-devkit/build-optimizer' optimizations when using the 'aot' option.
|
---|
28 | */
|
---|
29 | buildOptimizer?: boolean;
|
---|
30 | /**
|
---|
31 | * Generate a seperate bundle containing code used across multiple bundles.
|
---|
32 | */
|
---|
33 | commonChunk?: boolean;
|
---|
34 | /**
|
---|
35 | * Define the crossorigin attribute setting of elements that provide CORS support.
|
---|
36 | */
|
---|
37 | crossOrigin?: CrossOrigin;
|
---|
38 | /**
|
---|
39 | * Delete the output path before building.
|
---|
40 | */
|
---|
41 | deleteOutputPath?: boolean;
|
---|
42 | /**
|
---|
43 | * URL where files will be deployed.
|
---|
44 | */
|
---|
45 | deployUrl?: string;
|
---|
46 | /**
|
---|
47 | * Extract CSS from global styles into '.css' files instead of '.js'.
|
---|
48 | * @deprecated Deprecated since version 11.0. No longer required to disable CSS extraction
|
---|
49 | * for HMR.
|
---|
50 | */
|
---|
51 | extractCss?: boolean;
|
---|
52 | /**
|
---|
53 | * Extract all licenses in a separate file.
|
---|
54 | */
|
---|
55 | extractLicenses?: boolean;
|
---|
56 | /**
|
---|
57 | * Replace compilation source files with other compilation source files in the build.
|
---|
58 | */
|
---|
59 | fileReplacements?: FileReplacement[];
|
---|
60 | /**
|
---|
61 | * How to handle missing translations for i18n.
|
---|
62 | */
|
---|
63 | i18nMissingTranslation?: I18NMissingTranslation;
|
---|
64 | /**
|
---|
65 | * Configures the generation of the application's HTML index.
|
---|
66 | */
|
---|
67 | index: IndexUnion;
|
---|
68 | /**
|
---|
69 | * The stylesheet language to use for the application's inline component styles.
|
---|
70 | */
|
---|
71 | inlineStyleLanguage?: InlineStyleLanguage;
|
---|
72 | /**
|
---|
73 | * Translate the bundles in one or more locales.
|
---|
74 | */
|
---|
75 | localize?: Localize;
|
---|
76 | /**
|
---|
77 | * The full path for the main entry point to the app, relative to the current workspace.
|
---|
78 | */
|
---|
79 | main: string;
|
---|
80 | /**
|
---|
81 | * Use file name for lazy loaded chunks.
|
---|
82 | */
|
---|
83 | namedChunks?: boolean;
|
---|
84 | /**
|
---|
85 | * Path to ngsw-config.json.
|
---|
86 | */
|
---|
87 | ngswConfigPath?: string;
|
---|
88 | /**
|
---|
89 | * Enables optimization of the build output. Including minification of scripts and styles,
|
---|
90 | * tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For
|
---|
91 | * more information, see
|
---|
92 | * https://angular.io/guide/workspace-config#optimization-configuration.
|
---|
93 | */
|
---|
94 | optimization?: OptimizationUnion;
|
---|
95 | /**
|
---|
96 | * Define the output filename cache-busting hashing mode.
|
---|
97 | */
|
---|
98 | outputHashing?: OutputHashing;
|
---|
99 | /**
|
---|
100 | * The full path for the new output directory, relative to the current workspace.
|
---|
101 | *
|
---|
102 | * By default, writes output to a folder named dist/ in the current project.
|
---|
103 | */
|
---|
104 | outputPath: string;
|
---|
105 | /**
|
---|
106 | * Enable and define the file watching poll time period in milliseconds.
|
---|
107 | */
|
---|
108 | poll?: number;
|
---|
109 | /**
|
---|
110 | * The full path for the polyfills file, relative to the current workspace.
|
---|
111 | */
|
---|
112 | polyfills?: string;
|
---|
113 | /**
|
---|
114 | * Do not use the real path when resolving modules. If unset then will default to `true` if
|
---|
115 | * NodeJS option --preserve-symlinks is set.
|
---|
116 | */
|
---|
117 | preserveSymlinks?: boolean;
|
---|
118 | /**
|
---|
119 | * Log progress to the console while building.
|
---|
120 | */
|
---|
121 | progress?: boolean;
|
---|
122 | /**
|
---|
123 | * The path where style resources will be placed, relative to outputPath.
|
---|
124 | */
|
---|
125 | resourcesOutputPath?: string;
|
---|
126 | /**
|
---|
127 | * Global scripts to be included in the build.
|
---|
128 | */
|
---|
129 | scripts?: ExtraEntryPoint[];
|
---|
130 | /**
|
---|
131 | * Generates a service worker config for production builds.
|
---|
132 | */
|
---|
133 | serviceWorker?: boolean;
|
---|
134 | /**
|
---|
135 | * Show circular dependency warnings on builds.
|
---|
136 | * @deprecated The recommended method to detect circular dependencies in project code is to
|
---|
137 | * use either a lint rule or other external tooling.
|
---|
138 | */
|
---|
139 | showCircularDependencies?: boolean;
|
---|
140 | /**
|
---|
141 | * Output source maps for scripts and styles. For more information, see
|
---|
142 | * https://angular.io/guide/workspace-config#source-map-configuration.
|
---|
143 | */
|
---|
144 | sourceMap?: SourceMapUnion;
|
---|
145 | /**
|
---|
146 | * Generates a 'stats.json' file which can be analyzed using tools such as
|
---|
147 | * 'webpack-bundle-analyzer'.
|
---|
148 | */
|
---|
149 | statsJson?: boolean;
|
---|
150 | /**
|
---|
151 | * Options to pass to style preprocessors.
|
---|
152 | */
|
---|
153 | stylePreprocessorOptions?: StylePreprocessorOptions;
|
---|
154 | /**
|
---|
155 | * Global styles to be included in the build.
|
---|
156 | */
|
---|
157 | styles?: ExtraEntryPoint[];
|
---|
158 | /**
|
---|
159 | * Enables the use of subresource integrity validation.
|
---|
160 | */
|
---|
161 | subresourceIntegrity?: boolean;
|
---|
162 | /**
|
---|
163 | * The full path for the TypeScript configuration file, relative to the current workspace.
|
---|
164 | */
|
---|
165 | tsConfig: string;
|
---|
166 | /**
|
---|
167 | * Generate a seperate bundle containing only vendor libraries. This option should only used
|
---|
168 | * for development.
|
---|
169 | */
|
---|
170 | vendorChunk?: boolean;
|
---|
171 | /**
|
---|
172 | * Adds more details to output logging.
|
---|
173 | */
|
---|
174 | verbose?: boolean;
|
---|
175 | /**
|
---|
176 | * Run build when files change.
|
---|
177 | */
|
---|
178 | watch?: boolean;
|
---|
179 | /**
|
---|
180 | * TypeScript configuration for Web Worker modules.
|
---|
181 | */
|
---|
182 | webWorkerTsConfig?: string;
|
---|
183 | }
|
---|
184 | export declare type AssetPattern = AssetPatternClass | string;
|
---|
185 | export interface AssetPatternClass {
|
---|
186 | /**
|
---|
187 | * Allow glob patterns to follow symlink directories. This allows subdirectories of the
|
---|
188 | * symlink to be searched.
|
---|
189 | */
|
---|
190 | followSymlinks?: boolean;
|
---|
191 | /**
|
---|
192 | * The pattern to match.
|
---|
193 | */
|
---|
194 | glob: string;
|
---|
195 | /**
|
---|
196 | * An array of globs to ignore.
|
---|
197 | */
|
---|
198 | ignore?: string[];
|
---|
199 | /**
|
---|
200 | * The input directory path in which to apply 'glob'. Defaults to the project root.
|
---|
201 | */
|
---|
202 | input: string;
|
---|
203 | /**
|
---|
204 | * Absolute path within the output.
|
---|
205 | */
|
---|
206 | output: string;
|
---|
207 | }
|
---|
208 | export interface Budget {
|
---|
209 | /**
|
---|
210 | * The baseline size for comparison.
|
---|
211 | */
|
---|
212 | baseline?: string;
|
---|
213 | /**
|
---|
214 | * The threshold for error relative to the baseline (min & max).
|
---|
215 | */
|
---|
216 | error?: string;
|
---|
217 | /**
|
---|
218 | * The maximum threshold for error relative to the baseline.
|
---|
219 | */
|
---|
220 | maximumError?: string;
|
---|
221 | /**
|
---|
222 | * The maximum threshold for warning relative to the baseline.
|
---|
223 | */
|
---|
224 | maximumWarning?: string;
|
---|
225 | /**
|
---|
226 | * The minimum threshold for error relative to the baseline.
|
---|
227 | */
|
---|
228 | minimumError?: string;
|
---|
229 | /**
|
---|
230 | * The minimum threshold for warning relative to the baseline.
|
---|
231 | */
|
---|
232 | minimumWarning?: string;
|
---|
233 | /**
|
---|
234 | * The name of the bundle.
|
---|
235 | */
|
---|
236 | name?: string;
|
---|
237 | /**
|
---|
238 | * The type of budget.
|
---|
239 | */
|
---|
240 | type: Type;
|
---|
241 | /**
|
---|
242 | * The threshold for warning relative to the baseline (min & max).
|
---|
243 | */
|
---|
244 | warning?: string;
|
---|
245 | }
|
---|
246 | /**
|
---|
247 | * The type of budget.
|
---|
248 | */
|
---|
249 | export declare enum Type {
|
---|
250 | All = "all",
|
---|
251 | AllScript = "allScript",
|
---|
252 | Any = "any",
|
---|
253 | AnyComponentStyle = "anyComponentStyle",
|
---|
254 | AnyScript = "anyScript",
|
---|
255 | Bundle = "bundle",
|
---|
256 | Initial = "initial"
|
---|
257 | }
|
---|
258 | /**
|
---|
259 | * Define the crossorigin attribute setting of elements that provide CORS support.
|
---|
260 | */
|
---|
261 | export declare enum CrossOrigin {
|
---|
262 | Anonymous = "anonymous",
|
---|
263 | None = "none",
|
---|
264 | UseCredentials = "use-credentials"
|
---|
265 | }
|
---|
266 | export interface FileReplacement {
|
---|
267 | replace?: string;
|
---|
268 | replaceWith?: string;
|
---|
269 | src?: string;
|
---|
270 | with?: string;
|
---|
271 | }
|
---|
272 | /**
|
---|
273 | * How to handle missing translations for i18n.
|
---|
274 | */
|
---|
275 | export declare enum I18NMissingTranslation {
|
---|
276 | Error = "error",
|
---|
277 | Ignore = "ignore",
|
---|
278 | Warning = "warning"
|
---|
279 | }
|
---|
280 | /**
|
---|
281 | * Configures the generation of the application's HTML index.
|
---|
282 | */
|
---|
283 | export declare type IndexUnion = IndexObject | string;
|
---|
284 | export interface IndexObject {
|
---|
285 | /**
|
---|
286 | * The path of a file to use for the application's generated HTML index.
|
---|
287 | */
|
---|
288 | input: string;
|
---|
289 | /**
|
---|
290 | * The output path of the application's generated HTML index file. The full provided path
|
---|
291 | * will be used and will be considered relative to the application's configured output path.
|
---|
292 | */
|
---|
293 | output?: string;
|
---|
294 | }
|
---|
295 | /**
|
---|
296 | * The stylesheet language to use for the application's inline component styles.
|
---|
297 | */
|
---|
298 | export declare enum InlineStyleLanguage {
|
---|
299 | Css = "css",
|
---|
300 | Less = "less",
|
---|
301 | Sass = "sass",
|
---|
302 | Scss = "scss"
|
---|
303 | }
|
---|
304 | /**
|
---|
305 | * Translate the bundles in one or more locales.
|
---|
306 | */
|
---|
307 | export declare type Localize = string[] | boolean;
|
---|
308 | /**
|
---|
309 | * Enables optimization of the build output. Including minification of scripts and styles,
|
---|
310 | * tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For
|
---|
311 | * more information, see
|
---|
312 | * https://angular.io/guide/workspace-config#optimization-configuration.
|
---|
313 | */
|
---|
314 | export declare type OptimizationUnion = boolean | OptimizationClass;
|
---|
315 | export interface OptimizationClass {
|
---|
316 | /**
|
---|
317 | * Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY`
|
---|
318 | * environment variable can be used to specify a proxy server.
|
---|
319 | */
|
---|
320 | fonts?: FontsUnion;
|
---|
321 | /**
|
---|
322 | * Enables optimization of the scripts output.
|
---|
323 | */
|
---|
324 | scripts?: boolean;
|
---|
325 | /**
|
---|
326 | * Enables optimization of the styles output.
|
---|
327 | */
|
---|
328 | styles?: StylesUnion;
|
---|
329 | }
|
---|
330 | /**
|
---|
331 | * Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY`
|
---|
332 | * environment variable can be used to specify a proxy server.
|
---|
333 | */
|
---|
334 | export declare type FontsUnion = boolean | FontsClass;
|
---|
335 | export interface FontsClass {
|
---|
336 | /**
|
---|
337 | * Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS
|
---|
338 | * definitions in the application's HTML index file. This option requires internet access.
|
---|
339 | * `HTTPS_PROXY` environment variable can be used to specify a proxy server.
|
---|
340 | */
|
---|
341 | inline?: boolean;
|
---|
342 | }
|
---|
343 | /**
|
---|
344 | * Enables optimization of the styles output.
|
---|
345 | */
|
---|
346 | export declare type StylesUnion = boolean | StylesClass;
|
---|
347 | export interface StylesClass {
|
---|
348 | /**
|
---|
349 | * Extract and inline critical CSS definitions to improve first paint time.
|
---|
350 | */
|
---|
351 | inlineCritical?: boolean;
|
---|
352 | /**
|
---|
353 | * Minify CSS definitions by removing extraneous whitespace and comments, merging
|
---|
354 | * identifiers and minimizing values.
|
---|
355 | */
|
---|
356 | minify?: boolean;
|
---|
357 | }
|
---|
358 | /**
|
---|
359 | * Define the output filename cache-busting hashing mode.
|
---|
360 | */
|
---|
361 | export declare enum OutputHashing {
|
---|
362 | All = "all",
|
---|
363 | Bundles = "bundles",
|
---|
364 | Media = "media",
|
---|
365 | None = "none"
|
---|
366 | }
|
---|
367 | export declare type ExtraEntryPoint = ExtraEntryPointClass | string;
|
---|
368 | export interface ExtraEntryPointClass {
|
---|
369 | /**
|
---|
370 | * The bundle name for this extra entry point.
|
---|
371 | */
|
---|
372 | bundleName?: string;
|
---|
373 | /**
|
---|
374 | * If the bundle will be referenced in the HTML file.
|
---|
375 | */
|
---|
376 | inject?: boolean;
|
---|
377 | /**
|
---|
378 | * The file to include.
|
---|
379 | */
|
---|
380 | input: string;
|
---|
381 | }
|
---|
382 | /**
|
---|
383 | * Output source maps for scripts and styles. For more information, see
|
---|
384 | * https://angular.io/guide/workspace-config#source-map-configuration.
|
---|
385 | */
|
---|
386 | export declare type SourceMapUnion = boolean | SourceMapClass;
|
---|
387 | export interface SourceMapClass {
|
---|
388 | /**
|
---|
389 | * Output source maps used for error reporting tools.
|
---|
390 | */
|
---|
391 | hidden?: boolean;
|
---|
392 | /**
|
---|
393 | * Output source maps for all scripts.
|
---|
394 | */
|
---|
395 | scripts?: boolean;
|
---|
396 | /**
|
---|
397 | * Output source maps for all styles.
|
---|
398 | */
|
---|
399 | styles?: boolean;
|
---|
400 | /**
|
---|
401 | * Resolve vendor packages source maps.
|
---|
402 | */
|
---|
403 | vendor?: boolean;
|
---|
404 | }
|
---|
405 | /**
|
---|
406 | * Options to pass to style preprocessors.
|
---|
407 | */
|
---|
408 | export interface StylePreprocessorOptions {
|
---|
409 | /**
|
---|
410 | * Paths to include. Paths will be resolved to workspace root.
|
---|
411 | */
|
---|
412 | includePaths?: string[];
|
---|
413 | }
|
---|