1 | {
|
2 | "$schema": "http://json-schema.org/draft-06/schema#",
|
3 | "definitions": {
|
4 | "JsCompileTarget": {
|
5 | "enum": [
|
6 | "es2015",
|
7 | "es2016",
|
8 | "es2017",
|
9 | "es2018",
|
10 | "es5"
|
11 | ],
|
12 | "type": "string"
|
13 | },
|
14 | "LintOptions": {
|
15 | "properties": {
|
16 | "filesToIgnore": {
|
17 | "description": "An array of file globs to never report warnings for.\n\nThe globs follow [minimatch] syntax, and any file that matches any\nof the listed globs will never show any linter warnings. This will\ntypically not have a performance benefit, as the file will usually\nstill need to be analyzed.\n\n[minimatch]: https://github.com/isaacs/minimatch",
|
18 | "items": {
|
19 | "type": "string"
|
20 | },
|
21 | "type": "array"
|
22 | },
|
23 | "ignoreWarnings": {
|
24 | "description": "Deprecated way of spelling the `warningsToIgnore` lint option.\n\nUsed only if `warningsToIgnore` is not specified.",
|
25 | "items": {
|
26 | "type": "string"
|
27 | },
|
28 | "type": "array"
|
29 | },
|
30 | "rules": {
|
31 | "description": "The lint rules to run. Can be the code of a collection of rules like\n\"polymer-2\" or an individual rule like \"dom-module-invalid-attrs\".",
|
32 | "items": {
|
33 | "type": "string"
|
34 | },
|
35 | "type": "array"
|
36 | },
|
37 | "warningsToIgnore": {
|
38 | "description": "Warnings to ignore. After the rules are run, any warning that matches\none of these codes is ignored, project-wide.",
|
39 | "items": {
|
40 | "type": "string"
|
41 | },
|
42 | "type": "array"
|
43 | }
|
44 | },
|
45 | "type": "object"
|
46 | },
|
47 | "ModuleResolutionStrategy": {
|
48 | "enum": [
|
49 | "node",
|
50 | "none"
|
51 | ],
|
52 | "type": "string"
|
53 | },
|
54 | "ProjectBuildOptions": {
|
55 | "properties": {
|
56 | "addPushManifest": {
|
57 | "description": "If `true`, generate an [HTTP/2 Push\nManifest](https://github.com/GoogleChrome/http2-push-manifest) for your\napplication.",
|
58 | "type": "boolean"
|
59 | },
|
60 | "addServiceWorker": {
|
61 | "description": "Generate a service worker for your application to cache all files and\nassets on the client.\n\nPolymer CLI will generate a service worker for your build using the\n[sw-precache library](https://github.com/GoogleChrome/sw-precache). To\ncustomize your service worker, create a sw-precache-config.js file in your\nproject directory that exports your configuration. See the [sw-precache\nREADME](https://github.com/GoogleChrome/sw-precache) for a list of all\nsupported options.\n\nNote that the sw-precache library uses a cache-first strategy for maximum\nspeed and makes some other assumptions about how your service worker should\nbehave. Read the \"Considerations\" section of the sw-precache README to make\nsure that this is suitable for your application.",
|
62 | "type": "boolean"
|
63 | },
|
64 | "basePath": {
|
65 | "description": "Update the entrypoint's `<base>` tag, to support serving this build from a\nnon-root path, such as when doing differential serving based on user\nagent. Requires that a `<base>` tag already exists. This works well in\nconjunction with the convention of using relative URLs for static\nresources and absolute URLs for application routes.\n\nIf `true`, use the build `name`. If a `string`, use that value.\nLeading/trailing slashes are optional.",
|
66 | "type": [
|
67 | "string",
|
68 | "boolean"
|
69 | ]
|
70 | },
|
71 | "browserCapabilities": {
|
72 | "description": "Capabilities required for a browser to consume this build. Values include\n`es2015` and `push`. See canonical list at:\nhttps://github.com/Polymer/prpl-server-node/blob/master/src/capabilities.ts\n\nThis field is purely a hint to servers reading this configuration, and\ndoes not affect the build process. A server supporting differential\nserving (e.g. prpl-server) can use this field to help decide which build\nto serve to a given user agent.",
|
73 | "items": {
|
74 | "enum": [
|
75 | "es2015",
|
76 | "es2016",
|
77 | "es2017",
|
78 | "es2018",
|
79 | "modules",
|
80 | "push",
|
81 | "serviceworker"
|
82 | ],
|
83 | "type": "string"
|
84 | },
|
85 | "type": "array"
|
86 | },
|
87 | "bundle": {
|
88 | "anyOf": [
|
89 | {
|
90 | "properties": {
|
91 | "excludes": {
|
92 | "description": "URLs of files and/or folders that should not be inlined.",
|
93 | "items": {
|
94 | "type": "string"
|
95 | },
|
96 | "type": "array"
|
97 | },
|
98 | "inlineCss": {
|
99 | "description": "Inline external CSS file contents into <style> tags.",
|
100 | "type": "boolean"
|
101 | },
|
102 | "inlineScripts": {
|
103 | "description": "Inline external Javascript file contents into <script> tags.",
|
104 | "type": "boolean"
|
105 | },
|
106 | "rewriteUrlsInTemplates": {
|
107 | "description": "Rewrite element attributes inside of templates when inlining html.",
|
108 | "type": "boolean"
|
109 | },
|
110 | "sourcemaps": {
|
111 | "description": "Create identity source maps for inline scripts.",
|
112 | "type": "boolean"
|
113 | },
|
114 | "stripComments": {
|
115 | "description": "Remove all comments except those tagged '@license', or starting with\n`<!--!` or `<!--#`, when true.",
|
116 | "type": "boolean"
|
117 | },
|
118 | "treeshake": {
|
119 | "description": "Remove unreachable/unused code when bundling.",
|
120 | "type": "boolean"
|
121 | }
|
122 | },
|
123 | "type": "object"
|
124 | },
|
125 | {
|
126 | "type": "boolean"
|
127 | }
|
128 | ],
|
129 | "description": "By default, fragments are unbundled. This is optimal for HTTP/2-compatible\nservers and clients.\n\nIf the --bundle flag is supplied, all fragments are bundled together to\nreduce the number of file requests. This is optimal for sending to clients\nor serving from servers that are not HTTP/2 compatible."
|
130 | },
|
131 | "css": {
|
132 | "description": "Options for processing CSS.",
|
133 | "properties": {
|
134 | "minify": {
|
135 | "anyOf": [
|
136 | {
|
137 | "properties": {
|
138 | "exclude": {
|
139 | "description": "CSS files listed here will not be minified.",
|
140 | "items": {
|
141 | "type": "string"
|
142 | },
|
143 | "type": "array"
|
144 | }
|
145 | },
|
146 | "type": "object"
|
147 | },
|
148 | {
|
149 | "type": "boolean"
|
150 | }
|
151 | ],
|
152 | "description": "Minify inlined and external CSS."
|
153 | }
|
154 | },
|
155 | "type": "object"
|
156 | },
|
157 | "html": {
|
158 | "description": "Options for processing HTML.",
|
159 | "properties": {
|
160 | "minify": {
|
161 | "anyOf": [
|
162 | {
|
163 | "properties": {
|
164 | "exclude": {
|
165 | "description": "HTML files listed here will not be minified.",
|
166 | "items": {
|
167 | "type": "string"
|
168 | },
|
169 | "type": "array"
|
170 | }
|
171 | },
|
172 | "type": "object"
|
173 | },
|
174 | {
|
175 | "type": "boolean"
|
176 | }
|
177 | ],
|
178 | "description": "Minify HTMl by removing comments and whitespace."
|
179 | }
|
180 | },
|
181 | "type": "object"
|
182 | },
|
183 | "insertPrefetchLinks": {
|
184 | "description": "Insert prefetch link elements into your fragments so that all dependencies\nare prefetched immediately. Add dependency prefetching by inserting `<link\nrel=\"prefetch\">` tags into entrypoint and `<link rel=\"import\">` tags into\nfragments and shell for all dependencies.\n\nNote this option may trigger duplicate requests. See\nhttps://github.com/Polymer/polymer-build/issues/239 for details.",
|
185 | "type": "boolean"
|
186 | },
|
187 | "js": {
|
188 | "description": "Options for processing JavaScript.",
|
189 | "properties": {
|
190 | "compile": {
|
191 | "anyOf": [
|
192 | {
|
193 | "properties": {
|
194 | "exclude": {
|
195 | "description": "JavaScript files listed here will not be compiled.",
|
196 | "items": {
|
197 | "type": "string"
|
198 | },
|
199 | "type": "array"
|
200 | },
|
201 | "target": {
|
202 | "$ref": "#/definitions/JsCompileTarget"
|
203 | }
|
204 | },
|
205 | "type": "object"
|
206 | },
|
207 | {
|
208 | "enum": [
|
209 | "es2015",
|
210 | "es2016",
|
211 | "es2017",
|
212 | "es2018",
|
213 | "es5",
|
214 | false,
|
215 | true
|
216 | ]
|
217 | }
|
218 | ],
|
219 | "description": "Use babel to compile all ES6 JS down to ES5 for older browsers."
|
220 | },
|
221 | "minify": {
|
222 | "anyOf": [
|
223 | {
|
224 | "properties": {
|
225 | "exclude": {
|
226 | "description": "JavaScript files listed here will not be minified.",
|
227 | "items": {
|
228 | "type": "string"
|
229 | },
|
230 | "type": "array"
|
231 | }
|
232 | },
|
233 | "type": "object"
|
234 | },
|
235 | {
|
236 | "type": "boolean"
|
237 | }
|
238 | ],
|
239 | "description": "Minify inlined and external JavaScript."
|
240 | },
|
241 | "transformModulesToAmd": {
|
242 | "description": "Transform ES modules to AMD modules.",
|
243 | "type": "boolean"
|
244 | }
|
245 | },
|
246 | "type": "object"
|
247 | },
|
248 | "name": {
|
249 | "description": "The name of this build, used to determine the output directory name.",
|
250 | "type": "string"
|
251 | },
|
252 | "preset": {
|
253 | "description": "A build preset for this build. A build can inherit some base configuration\nfrom a named preset.",
|
254 | "type": "string"
|
255 | },
|
256 | "swPrecacheConfig": {
|
257 | "description": "A config file that's passed to the [sw-precache\nlibrary](https://github.com/GoogleChrome/sw-precache). See [its\nREADME](https://github.com/GoogleChrome/sw-precache) for details of the\nformat of this file.\n\nIgnored if `addServiceWorker` is not `true`.\n\nDefaults to `\"sw-precache-config.js`.",
|
258 | "type": "string"
|
259 | }
|
260 | },
|
261 | "type": "object"
|
262 | }
|
263 | },
|
264 | "properties": {
|
265 | "autoBasePath": {
|
266 | "description": "Set `basePath: true` on all builds. See that option for more details.",
|
267 | "type": "boolean"
|
268 | },
|
269 | "builds": {
|
270 | "description": "List of build option configurations.",
|
271 | "items": {
|
272 | "$ref": "#/definitions/ProjectBuildOptions"
|
273 | },
|
274 | "type": "array"
|
275 | },
|
276 | "componentDir": {
|
277 | "description": "The directory containing this project's dependencies.",
|
278 | "type": "string"
|
279 | },
|
280 | "entrypoint": {
|
281 | "description": "The path relative to `root` of the entrypoint file that will be served for\napp-shell style projects. Usually this is index.html.",
|
282 | "type": "string"
|
283 | },
|
284 | "extraDependencies": {
|
285 | "description": "List of file paths, relative to the project directory, that should be\nincluded as extraDependencies in the build target.",
|
286 | "items": {
|
287 | "type": "string"
|
288 | },
|
289 | "type": "array"
|
290 | },
|
291 | "fragments": {
|
292 | "description": "The path relative to `root` of the lazily loaded fragments. Usually the\npages of an app or other bundles of on-demand resources.",
|
293 | "items": {
|
294 | "type": "string"
|
295 | },
|
296 | "type": "array"
|
297 | },
|
298 | "lint": {
|
299 | "$ref": "#/definitions/LintOptions",
|
300 | "description": "Options for the Polymer Linter."
|
301 | },
|
302 | "moduleResolution": {
|
303 | "$ref": "#/definitions/ModuleResolutionStrategy",
|
304 | "description": "Algorithm to use for resolving module specifiers in import and export\nstatements when rewriting them to be web-compatible. Valid values are:\n\n\"none\": Disable module specifier rewriting. This is the default.\n\"node\": Use Node.js resolution to find modules."
|
305 | },
|
306 | "npm": {
|
307 | "description": "Sets other options' defaults to NPM-appropriate values:\n\n - 'componentDir': 'node_modules/'",
|
308 | "type": "boolean"
|
309 | },
|
310 | "root": {
|
311 | "description": "Path to the root of the project on the filesystem. This can be an absolute\npath, or a path relative to the current working directory. Defaults to the\ncurrent working directory of the process.",
|
312 | "type": "string"
|
313 | },
|
314 | "shell": {
|
315 | "description": "The path relative to `root` of the app shell element.",
|
316 | "type": "string"
|
317 | },
|
318 | "sources": {
|
319 | "description": "List of glob patterns, relative to root, of this project's sources to read\nfrom the file system.",
|
320 | "items": {
|
321 | "type": "string"
|
322 | },
|
323 | "type": "array"
|
324 | }
|
325 | },
|
326 | "type": "object"
|
327 | }
|
328 |
|