UNPKG

9.55 kBJSONView Raw
1{
2 "$schema": "http://json-schema.org/draft-07/schema",
3 "title": "Custom webpack karma schema for Build Facade",
4 "description": "Karma target options",
5 "type": "object",
6 "properties": {
7 "main": {
8 "type": "string",
9 "description": "The name of the main entry-point file."
10 },
11 "tsConfig": {
12 "type": "string",
13 "description": "The name of the TypeScript configuration file."
14 },
15 "karmaConfig": {
16 "type": "string",
17 "description": "The name of the Karma configuration file."
18 },
19 "polyfills": {
20 "type": "string",
21 "description": "The name of the polyfills file."
22 },
23 "assets": {
24 "type": "array",
25 "description": "List of static application assets.",
26 "default": [],
27 "items": {
28 "$ref": "#/definitions/assetPattern"
29 }
30 },
31 "scripts": {
32 "description": "Global scripts to be included in the build.",
33 "type": "array",
34 "default": [],
35 "items": {
36 "oneOf": [
37 {
38 "type": "object",
39 "properties": {
40 "input": {
41 "type": "string",
42 "description": "The file to include.",
43 "pattern": "\\.[cm]?jsx?$"
44 },
45 "bundleName": {
46 "type": "string",
47 "pattern": "^[\\w\\-.]*$",
48 "description": "The bundle name for this extra entry point."
49 },
50 "inject": {
51 "type": "boolean",
52 "description": "If the bundle will be referenced in the HTML file.",
53 "default": true
54 }
55 },
56 "additionalProperties": false,
57 "required": [
58 "input"
59 ]
60 },
61 {
62 "type": "string",
63 "description": "The file to include.",
64 "pattern": "\\.[cm]?jsx?$"
65 }
66 ]
67 }
68 },
69 "styles": {
70 "description": "Global styles to be included in the build.",
71 "type": "array",
72 "default": [],
73 "items": {
74 "oneOf": [
75 {
76 "type": "object",
77 "properties": {
78 "input": {
79 "type": "string",
80 "description": "The file to include.",
81 "pattern": "\\.(?:css|scss|sass|less|styl)$"
82 },
83 "bundleName": {
84 "type": "string",
85 "pattern": "^[\\w\\-.]*$",
86 "description": "The bundle name for this extra entry point."
87 },
88 "inject": {
89 "type": "boolean",
90 "description": "If the bundle will be referenced in the HTML file.",
91 "default": true
92 }
93 },
94 "additionalProperties": false,
95 "required": [
96 "input"
97 ]
98 },
99 {
100 "type": "string",
101 "description": "The file to include.",
102 "pattern": "\\.(?:css|scss|sass|less|styl)$"
103 }
104 ]
105 }
106 },
107 "inlineStyleLanguage": {
108 "description": "The stylesheet language to use for the application's inline component styles.",
109 "type": "string",
110 "default": "css",
111 "enum": [
112 "css",
113 "less",
114 "sass",
115 "scss"
116 ]
117 },
118 "stylePreprocessorOptions": {
119 "description": "Options to pass to style preprocessors",
120 "type": "object",
121 "properties": {
122 "includePaths": {
123 "description": "Paths to include. Paths will be resolved to workspace root.",
124 "type": "array",
125 "items": {
126 "type": "string"
127 },
128 "default": []
129 }
130 },
131 "additionalProperties": false
132 },
133 "include": {
134 "type": "array",
135 "items": {
136 "type": "string"
137 },
138 "description": "Globs of files to include, relative to workspace or project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead."
139 },
140 "sourceMap": {
141 "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
142 "default": true,
143 "oneOf": [
144 {
145 "type": "object",
146 "properties": {
147 "scripts": {
148 "type": "boolean",
149 "description": "Output source maps for all scripts.",
150 "default": true
151 },
152 "styles": {
153 "type": "boolean",
154 "description": "Output source maps for all styles.",
155 "default": true
156 },
157 "vendor": {
158 "type": "boolean",
159 "description": "Resolve vendor packages source maps.",
160 "default": false
161 }
162 },
163 "additionalProperties": false
164 },
165 {
166 "type": "boolean"
167 }
168 ]
169 },
170 "progress": {
171 "type": "boolean",
172 "description": "Log progress to the console while building.",
173 "default": true
174 },
175 "watch": {
176 "type": "boolean",
177 "description": "Run build when files change."
178 },
179 "poll": {
180 "type": "number",
181 "description": "Enable and define the file watching poll time period in milliseconds."
182 },
183 "preserveSymlinks": {
184 "type": "boolean",
185 "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
186 },
187 "browsers": {
188 "type": "string",
189 "description": "Override which browsers tests are run against."
190 },
191 "codeCoverage": {
192 "type": "boolean",
193 "description": "Output a code coverage report.",
194 "default": false
195 },
196 "codeCoverageExclude": {
197 "type": "array",
198 "description": "Globs to exclude from code coverage.",
199 "items": {
200 "type": "string"
201 },
202 "default": []
203 },
204 "fileReplacements": {
205 "description": "Replace compilation source files with other compilation source files in the build.",
206 "type": "array",
207 "items": {
208 "oneOf": [
209 {
210 "type": "object",
211 "properties": {
212 "src": {
213 "type": "string"
214 },
215 "replaceWith": {
216 "type": "string"
217 }
218 },
219 "additionalProperties": false,
220 "required": [
221 "src",
222 "replaceWith"
223 ]
224 },
225 {
226 "type": "object",
227 "properties": {
228 "replace": {
229 "type": "string"
230 },
231 "with": {
232 "type": "string"
233 }
234 },
235 "additionalProperties": false,
236 "required": [
237 "replace",
238 "with"
239 ]
240 }
241 ]
242 },
243 "default": []
244 },
245 "reporters": {
246 "type": "array",
247 "description": "Karma reporters to use. Directly passed to the karma runner.",
248 "items": {
249 "type": "string"
250 }
251 },
252 "webWorkerTsConfig": {
253 "type": "string",
254 "description": "TypeScript configuration for Web Worker modules."
255 },
256 "customWebpackConfig": {
257 "description": "Custom webpack configuration",
258 "default": false,
259 "oneOf": [
260 {
261 "type": "object",
262 "properties": {
263 "path": {
264 "type": "string",
265 "description": "Path to the custom webpack configuration file"
266 },
267 "mergeRules": {
268 "type": "object",
269 "description": "Merge rules as described here: https://github.com/survivejs/webpack-merge#mergewithrules"
270 },
271 "replaceDuplicatePlugins": {
272 "type": "boolean",
273 "description": "Flag that indicates whether to replace duplicate webpack plugins or not"
274 }
275 }
276 },
277 {
278 "type": "boolean"
279 }
280 ]
281 },
282 "indexTransform": {
283 "type": "string",
284 "description": "Path to the file with index.html transform function"
285 }
286 },
287 "additionalProperties": false,
288 "required": [
289 "main",
290 "tsConfig",
291 "karmaConfig"
292 ],
293 "definitions": {
294 "assetPattern": {
295 "oneOf": [
296 {
297 "type": "object",
298 "properties": {
299 "glob": {
300 "type": "string",
301 "description": "The pattern to match."
302 },
303 "input": {
304 "type": "string",
305 "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
306 },
307 "output": {
308 "type": "string",
309 "description": "Absolute path within the output."
310 },
311 "ignore": {
312 "description": "An array of globs to ignore.",
313 "type": "array",
314 "items": {
315 "type": "string"
316 }
317 }
318 },
319 "additionalProperties": false,
320 "required": [
321 "glob",
322 "input",
323 "output"
324 ]
325 },
326 {
327 "type": "string"
328 }
329 ]
330 }
331 },
332 "$id": "BuildCustomWebpackKarmaSchema"
333}
\No newline at end of file