UNPKG

6.34 kBTypeScriptView Raw
1export interface Schema {
2 /**
3 * List of static application assets.
4 */
5 assets?: AssetPattern[];
6 /**
7 * Delete the output path before building.
8 */
9 deleteOutputPath?: boolean;
10 /**
11 * URL where files will be deployed.
12 * @deprecated Use "baseHref" browser builder option, "APP_BASE_HREF" DI token or a
13 * combination of both instead. For more information, see
14 * https://angular.io/guide/deployment#the-deploy-url.
15 */
16 deployUrl?: string;
17 /**
18 * Exclude the listed external dependencies from being bundled into the bundle. Instead, the
19 * created bundle relies on these dependencies to be available during runtime.
20 */
21 externalDependencies?: string[];
22 /**
23 * Extract all licenses in a separate file, in the case of production builds only.
24 */
25 extractLicenses?: boolean;
26 /**
27 * Replace compilation source files with other compilation source files in the build.
28 */
29 fileReplacements?: FileReplacement[];
30 /**
31 * How to handle duplicate translations for i18n.
32 */
33 i18nDuplicateTranslation?: I18NTranslation;
34 /**
35 * How to handle missing translations for i18n.
36 */
37 i18nMissingTranslation?: I18NTranslation;
38 /**
39 * The stylesheet language to use for the application's inline component styles.
40 */
41 inlineStyleLanguage?: InlineStyleLanguage;
42 /**
43 * Translate the bundles in one or more locales.
44 */
45 localize?: Localize;
46 /**
47 * The name of the main entry-point file.
48 */
49 main: string;
50 /**
51 * Use file name for lazy loaded chunks.
52 */
53 namedChunks?: boolean;
54 /**
55 * Enables optimization of the build output. Including minification of scripts and styles,
56 * tree-shaking and dead-code elimination. For more information, see
57 * https://angular.io/guide/workspace-config#optimization-configuration.
58 */
59 optimization?: OptimizationUnion;
60 /**
61 * Define the output filename cache-busting hashing mode.
62 */
63 outputHashing?: OutputHashing;
64 /**
65 * Path where output will be placed.
66 */
67 outputPath: string;
68 /**
69 * Enable and define the file watching poll time period in milliseconds.
70 */
71 poll?: number;
72 /**
73 * Do not use the real path when resolving modules. If unset then will default to `true` if
74 * NodeJS option --preserve-symlinks is set.
75 */
76 preserveSymlinks?: boolean;
77 /**
78 * Log progress to the console while building.
79 */
80 progress?: boolean;
81 /**
82 * The path where style resources will be placed, relative to outputPath.
83 */
84 resourcesOutputPath?: string;
85 /**
86 * Output source maps for scripts and styles. For more information, see
87 * https://angular.io/guide/workspace-config#source-map-configuration.
88 */
89 sourceMap?: SourceMapUnion;
90 /**
91 * Generates a 'stats.json' file which can be analyzed using tools such as
92 * 'webpack-bundle-analyzer'.
93 */
94 statsJson?: boolean;
95 /**
96 * Options to pass to style preprocessors
97 */
98 stylePreprocessorOptions?: StylePreprocessorOptions;
99 /**
100 * The name of the TypeScript configuration file.
101 */
102 tsConfig: string;
103 /**
104 * Generate a seperate bundle containing only vendor libraries. This option should only be
105 * used for development to reduce the incremental compilation time.
106 */
107 vendorChunk?: boolean;
108 /**
109 * Adds more details to output logging.
110 */
111 verbose?: boolean;
112 /**
113 * Run build when files change.
114 */
115 watch?: boolean;
116}
117export type AssetPattern = AssetPatternClass | string;
118export interface AssetPatternClass {
119 /**
120 * Allow glob patterns to follow symlink directories. This allows subdirectories of the
121 * symlink to be searched.
122 */
123 followSymlinks?: boolean;
124 /**
125 * The pattern to match.
126 */
127 glob: string;
128 /**
129 * An array of globs to ignore.
130 */
131 ignore?: string[];
132 /**
133 * The input directory path in which to apply 'glob'. Defaults to the project root.
134 */
135 input: string;
136 /**
137 * Absolute path within the output.
138 */
139 output: string;
140}
141export interface FileReplacement {
142 replace?: string;
143 replaceWith?: string;
144 src?: string;
145 with?: string;
146}
147/**
148 * How to handle duplicate translations for i18n.
149 *
150 * How to handle missing translations for i18n.
151 */
152export declare enum I18NTranslation {
153 Error = "error",
154 Ignore = "ignore",
155 Warning = "warning"
156}
157/**
158 * The stylesheet language to use for the application's inline component styles.
159 */
160export declare enum InlineStyleLanguage {
161 Css = "css",
162 Less = "less",
163 Sass = "sass",
164 Scss = "scss"
165}
166/**
167 * Translate the bundles in one or more locales.
168 */
169export type Localize = string[] | boolean;
170/**
171 * Enables optimization of the build output. Including minification of scripts and styles,
172 * tree-shaking and dead-code elimination. For more information, see
173 * https://angular.io/guide/workspace-config#optimization-configuration.
174 */
175export type OptimizationUnion = boolean | OptimizationClass;
176export interface OptimizationClass {
177 /**
178 * Enables optimization of the scripts output.
179 */
180 scripts?: boolean;
181 /**
182 * Enables optimization of the styles output.
183 */
184 styles?: boolean;
185}
186/**
187 * Define the output filename cache-busting hashing mode.
188 */
189export declare enum OutputHashing {
190 All = "all",
191 Bundles = "bundles",
192 Media = "media",
193 None = "none"
194}
195/**
196 * Output source maps for scripts and styles. For more information, see
197 * https://angular.io/guide/workspace-config#source-map-configuration.
198 */
199export type SourceMapUnion = boolean | SourceMapClass;
200export interface SourceMapClass {
201 /**
202 * Output source maps used for error reporting tools.
203 */
204 hidden?: boolean;
205 /**
206 * Output source maps for all scripts.
207 */
208 scripts?: boolean;
209 /**
210 * Output source maps for all styles.
211 */
212 styles?: boolean;
213 /**
214 * Resolve vendor packages source maps.
215 */
216 vendor?: boolean;
217}
218/**
219 * Options to pass to style preprocessors
220 */
221export interface StylePreprocessorOptions {
222 /**
223 * Paths to include. Paths will be resolved to workspace root.
224 */
225 includePaths?: string[];
226}