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