UNPKG

9.05 kBJSONView Raw
1{
2 "$schema": "http://json-schema.org/draft-07/schema",
3 "title": "Karma Target",
4 "description": "Karma target options for Build Facade.",
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": ["input"]
72 },
73 {
74 "type": "string",
75 "description": "The file to include.",
76 "pattern": "\\.[cm]?jsx?$"
77 }
78 ]
79 }
80 },
81 "styles": {
82 "description": "Global styles to be included in the build.",
83 "type": "array",
84 "default": [],
85 "items": {
86 "oneOf": [
87 {
88 "type": "object",
89 "properties": {
90 "input": {
91 "type": "string",
92 "description": "The file to include.",
93 "pattern": "\\.(?:css|scss|sass|less)$"
94 },
95 "bundleName": {
96 "type": "string",
97 "pattern": "^[\\w\\-.]*$",
98 "description": "The bundle name for this extra entry point."
99 },
100 "inject": {
101 "type": "boolean",
102 "description": "If the bundle will be referenced in the HTML file.",
103 "default": true
104 }
105 },
106 "additionalProperties": false,
107 "required": ["input"]
108 },
109 {
110 "type": "string",
111 "description": "The file to include.",
112 "pattern": "\\.(?:css|scss|sass|less)$"
113 }
114 ]
115 }
116 },
117 "inlineStyleLanguage": {
118 "description": "The stylesheet language to use for the application's inline component styles.",
119 "type": "string",
120 "default": "css",
121 "enum": ["css", "less", "sass", "scss"]
122 },
123 "stylePreprocessorOptions": {
124 "description": "Options to pass to style preprocessors",
125 "type": "object",
126 "properties": {
127 "includePaths": {
128 "description": "Paths to include. Paths will be resolved to workspace root.",
129 "type": "array",
130 "items": {
131 "type": "string"
132 },
133 "default": []
134 }
135 },
136 "additionalProperties": false
137 },
138 "include": {
139 "type": "array",
140 "items": {
141 "type": "string"
142 },
143 "default": ["**/*.spec.ts"],
144 "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."
145 },
146 "exclude": {
147 "type": "array",
148 "items": {
149 "type": "string"
150 },
151 "default": [],
152 "description": "Globs of files to exclude, relative to the project root."
153 },
154 "sourceMap": {
155 "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
156 "default": true,
157 "oneOf": [
158 {
159 "type": "object",
160 "properties": {
161 "scripts": {
162 "type": "boolean",
163 "description": "Output source maps for all scripts.",
164 "default": true
165 },
166 "styles": {
167 "type": "boolean",
168 "description": "Output source maps for all styles.",
169 "default": true
170 },
171 "vendor": {
172 "type": "boolean",
173 "description": "Resolve vendor packages source maps.",
174 "default": false
175 }
176 },
177 "additionalProperties": false
178 },
179 {
180 "type": "boolean"
181 }
182 ]
183 },
184 "progress": {
185 "type": "boolean",
186 "description": "Log progress to the console while building.",
187 "default": true
188 },
189 "watch": {
190 "type": "boolean",
191 "description": "Run build when files change."
192 },
193 "poll": {
194 "type": "number",
195 "description": "Enable and define the file watching poll time period in milliseconds."
196 },
197 "preserveSymlinks": {
198 "type": "boolean",
199 "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
200 },
201 "browsers": {
202 "type": "string",
203 "description": "Override which browsers tests are run against."
204 },
205 "codeCoverage": {
206 "type": "boolean",
207 "description": "Output a code coverage report.",
208 "default": false
209 },
210 "codeCoverageExclude": {
211 "type": "array",
212 "description": "Globs to exclude from code coverage.",
213 "items": {
214 "type": "string"
215 },
216 "default": []
217 },
218 "fileReplacements": {
219 "description": "Replace compilation source files with other compilation source files in the build.",
220 "type": "array",
221 "items": {
222 "oneOf": [
223 {
224 "type": "object",
225 "properties": {
226 "src": {
227 "type": "string"
228 },
229 "replaceWith": {
230 "type": "string"
231 }
232 },
233 "additionalProperties": false,
234 "required": ["src", "replaceWith"]
235 },
236 {
237 "type": "object",
238 "properties": {
239 "replace": {
240 "type": "string"
241 },
242 "with": {
243 "type": "string"
244 }
245 },
246 "additionalProperties": false,
247 "required": ["replace", "with"]
248 }
249 ]
250 },
251 "default": []
252 },
253 "reporters": {
254 "type": "array",
255 "description": "Karma reporters to use. Directly passed to the karma runner.",
256 "items": {
257 "type": "string"
258 }
259 },
260 "webWorkerTsConfig": {
261 "type": "string",
262 "description": "TypeScript configuration for Web Worker modules."
263 }
264 },
265 "additionalProperties": false,
266 "required": ["tsConfig"],
267 "definitions": {
268 "assetPattern": {
269 "oneOf": [
270 {
271 "type": "object",
272 "properties": {
273 "glob": {
274 "type": "string",
275 "description": "The pattern to match."
276 },
277 "input": {
278 "type": "string",
279 "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
280 },
281 "output": {
282 "type": "string",
283 "description": "Absolute path within the output."
284 },
285 "ignore": {
286 "description": "An array of globs to ignore.",
287 "type": "array",
288 "items": {
289 "type": "string"
290 }
291 }
292 },
293 "additionalProperties": false,
294 "required": ["glob", "input", "output"]
295 },
296 {
297 "type": "string"
298 }
299 ]
300 }
301 }
302}