polymer-project-config
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -11,2 +11,5 @@ # Change Log | ||
## [4.0.3] - 2019-03-01 | ||
* Added support for `treeshake` option to remove dead JavaScript code when bundling. | ||
## [4.0.2] - 2018-06-28 | ||
@@ -13,0 +16,0 @@ * Add `modules` to the browser capabilities of the `uncompiled-bundled` and |
@@ -94,2 +94,4 @@ /** | ||
stripComments?: boolean; | ||
/** Remove unreachable/unused code when bundling. */ | ||
treeshake?: boolean; | ||
}; | ||
@@ -96,0 +98,0 @@ /** Options for processing HTML. */ |
@@ -0,1 +1,14 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | ||
* This code may only be used under the BSD style license found at | ||
* http://polymer.github.io/LICENSE.txt | ||
* The complete set of authors may be found at | ||
* http://polymer.github.io/AUTHORS.txt | ||
* The complete set of contributors may be found at | ||
* http://polymer.github.io/CONTRIBUTORS.txt | ||
* Code distributed by Google as part of the polymer project is also | ||
* subject to an additional IP rights grant found at | ||
* http://polymer.github.io/PATENTS.txt | ||
*/ | ||
import { ProjectBuildOptions } from './builds'; | ||
@@ -2,0 +15,0 @@ import { FsUrlLoader, PackageUrlResolver, WarningFilter, Analyzer } from 'polymer-analyzer'; |
@@ -117,2 +117,6 @@ { | ||
"type": "boolean" | ||
}, | ||
"treeshake": { | ||
"description": "Remove unreachable/unused code when bundling.", | ||
"type": "boolean" | ||
} | ||
@@ -119,0 +123,0 @@ }, |
@@ -0,1 +1,11 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | ||
* This code may only be used under the BSD style license found at | ||
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found | ||
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may | ||
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by | ||
* Google as part of the polymer project is also subject to an additional IP | ||
* rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
export {}; |
@@ -28,2 +28,3 @@ "use strict"; | ||
chai_1.assert.equal(builds_1.isValidPreset(''), false); | ||
// tslint:disable:no-any | ||
chai_1.assert.equal(builds_1.isValidPreset(null), false); | ||
@@ -33,2 +34,3 @@ chai_1.assert.equal(builds_1.isValidPreset(undefined), false); | ||
chai_1.assert.equal(builds_1.isValidPreset(1), false); | ||
// tslint:enable:no-any | ||
}); | ||
@@ -35,0 +37,0 @@ }); |
@@ -0,3 +1,13 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | ||
* This code may only be used under the BSD style license found at | ||
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found | ||
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may | ||
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by | ||
* Google as part of the polymer project is also subject to an additional IP | ||
* rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
declare const assert: any; | ||
declare const path: any; | ||
declare const ProjectConfig: any; |
@@ -585,2 +585,3 @@ /** | ||
basePath: true, | ||
bundle: { treeshake: true }, | ||
html: { | ||
@@ -587,0 +588,0 @@ minify: { |
{ | ||
"name": "polymer-project-config", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "reads, validates, and shapes your polymer.json project configuration", | ||
@@ -13,18 +13,17 @@ "homepage": "https://github.com/Polymer/tools/tree/master/packages/project-config", | ||
"scripts": { | ||
"build": "tsc && typescript-json-schema src/index.ts ProjectOptions --ignoreErrors -o lib/schema.json", | ||
"build": "tsc && typescript-json-schema src/index.ts ProjectOptions --ignoreErrors -o lib/schema.json && npm run lint", | ||
"format": "find src -name \"*.ts\" | xargs clang-format --style=file -i", | ||
"lint": "tslint -p .", | ||
"test": "npm run build && mocha \"test/**/*_test.js\"", | ||
"test:unit": "mocha \"test/**/*_test.js\"", | ||
"format": "find src test \\( -iname \"*.ts\" -o -iname \"*.js\" \\) | xargs clang-format --style=file -i" | ||
"test:unit": "mocha \"test/**/*_test.js\"" | ||
}, | ||
"dependencies": { | ||
"@types/node": "^9.6.4", | ||
"@types/parse5": "^2.2.34", | ||
"browser-capabilities": "^1.0.0", | ||
"jsonschema": "^1.1.1", | ||
"minimatch-all": "^1.1.0", | ||
"plylog": "^0.5.0" | ||
"plylog": "^1.0.0", | ||
"winston": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.0.2", | ||
"chai": "^3.5.0", | ||
"clang-format": "1.0.49", | ||
"polymer-analyzer": "^3.0.1", | ||
@@ -31,0 +30,0 @@ "source-map-support": "^0.5.5" |
@@ -17,3 +17,3 @@ /** | ||
export type JsCompileTarget = 'es5' | 'es2015' | 'es2016' | 'es2017' | 'es2018'; | ||
export type JsCompileTarget = 'es5'|'es2015'|'es2016'|'es2017'|'es2018'; | ||
@@ -110,2 +110,5 @@ export interface ProjectBuildOptions { | ||
stripComments?: boolean, | ||
/** Remove unreachable/unused code when bundling. */ | ||
treeshake?: boolean, | ||
}; | ||
@@ -116,3 +119,3 @@ | ||
/** Minify HTMl by removing comments and whitespace. */ | ||
minify?: boolean | { | ||
minify?: boolean|{ | ||
/** HTML files listed here will not be minified. */ | ||
@@ -126,3 +129,3 @@ exclude?: string[], | ||
/** Minify inlined and external CSS. */ | ||
minify?: boolean | { | ||
minify?: boolean|{ | ||
/** CSS files listed here will not be minified. */ | ||
@@ -136,3 +139,3 @@ exclude?: string[], | ||
/** Minify inlined and external JavaScript. */ | ||
minify?: boolean | { | ||
minify?: boolean|{ | ||
/** JavaScript files listed here will not be minified. */ | ||
@@ -143,7 +146,8 @@ exclude?: string[], | ||
/** Use babel to compile all ES6 JS down to ES5 for older browsers. */ | ||
compile?: boolean|JsCompileTarget|{ | ||
target?: JsCompileTarget; | ||
/** JavaScript files listed here will not be compiled. */ | ||
exclude?: string[], | ||
}, | ||
compile?: | ||
boolean|JsCompileTarget|{ | ||
target?: JsCompileTarget; | ||
/** JavaScript files listed here will not be compiled. */ | ||
exclude?: string[], | ||
}, | ||
@@ -150,0 +154,0 @@ /** Transform ES modules to AMD modules. */ |
@@ -30,2 +30,3 @@ /** | ||
assert.equal(isValidPreset(''), false); | ||
// tslint:disable:no-any | ||
assert.equal(isValidPreset(null as any), false); | ||
@@ -35,2 +36,3 @@ assert.equal(isValidPreset(undefined as any), false); | ||
assert.equal(isValidPreset(1 as any), false); | ||
// tslint:enable:no-any | ||
}); | ||
@@ -37,0 +39,0 @@ }); |
@@ -689,2 +689,3 @@ /** | ||
basePath: true, | ||
bundle: {treeshake: true}, | ||
html: { | ||
@@ -691,0 +692,0 @@ minify: { |
@@ -26,8 +26,17 @@ { | ||
"basePath": true, | ||
"bundle": { | ||
"treeshake": true | ||
}, | ||
"js": { | ||
"compile": { | ||
"exclude": ["js/breaks-when-compiled.js", "js/no-compilation-necessary.js"] | ||
"exclude": [ | ||
"js/breaks-when-compiled.js", | ||
"js/no-compilation-necessary.js" | ||
] | ||
}, | ||
"minify": { | ||
"exclude": ["js/unminifiable.js", "js/already-minified.js"] | ||
"exclude": [ | ||
"js/unminifiable.js", | ||
"js/already-minified.js" | ||
] | ||
}, | ||
@@ -38,3 +47,6 @@ "transformEsModulesToAmd": true | ||
"minify": { | ||
"exclude": ["human-readable-example.html", "weird-ie-comments-issue.html"] | ||
"exclude": [ | ||
"human-readable-example.html", | ||
"weird-ie-comments-issue.html" | ||
] | ||
} | ||
@@ -44,3 +56,6 @@ }, | ||
"minify": { | ||
"exclude": ["css/human-readable-example.css", "css/advanced-syntax.css"] | ||
"exclude": [ | ||
"css/human-readable-example.css", | ||
"css/advanced-syntax.css" | ||
] | ||
} | ||
@@ -47,0 +62,0 @@ } |
@@ -8,2 +8,6 @@ { | ||
"paths": { | ||
"parse5": [ | ||
"node_modules/@types/parse5", | ||
"*" | ||
], | ||
"ua-parser-js": [ | ||
@@ -10,0 +14,0 @@ "node_modules/@types/ua-parser-js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
193692
2
3771
7
29
+ Added@types/parse5@^2.2.34
+ Addedwinston@^3.0.0
+ Added@colors/colors@1.6.0(transitive)
+ Added@dabh/diagnostics@2.0.3(transitive)
+ Added@types/node@22.9.0(transitive)
+ Added@types/triple-beam@1.3.5(transitive)
+ Addedabort-controller@3.0.0(transitive)
+ Addedasync@3.2.6(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addedcolor@3.2.1(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcolor-string@1.9.1(transitive)
+ Addedcolors@1.4.0(transitive)
+ Addedcolorspace@1.1.4(transitive)
+ Addedenabled@2.0.0(transitive)
+ Addedevent-target-shim@5.0.1(transitive)
+ Addedevents@3.3.0(transitive)
+ Addedfast-safe-stringify@2.1.1(transitive)
+ Addedfecha@2.3.34.2.3(transitive)
+ Addedfn.name@1.1.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arrayish@0.3.2(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedkuler@2.0.0(transitive)
+ Addedlogform@1.10.02.6.1(transitive)
+ Addedone-time@1.0.0(transitive)
+ Addedplylog@1.1.0(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedreadable-stream@3.6.24.5.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafe-stable-stringify@2.5.0(transitive)
+ Addedsimple-swizzle@0.2.2(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedtext-hex@1.0.0(transitive)
+ Addedtriple-beam@1.4.1(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwinston@3.16.0(transitive)
+ Addedwinston-transport@4.8.0(transitive)
- Removed@types/node@^9.6.4
- Removed@types/node@9.6.61(transitive)
- Removed@types/winston@2.4.4(transitive)
- Removedasync@2.6.4(transitive)
- Removedcolors@1.0.3(transitive)
- Removedcycle@1.0.3(transitive)
- Removedeyes@0.1.8(transitive)
- Removedisstream@0.1.2(transitive)
- Removedlodash@4.17.21(transitive)
- Removedplylog@0.5.0(transitive)
- Removedwinston@2.4.7(transitive)
Updatedplylog@^1.0.0