聚合物构建不创建捆绑和非捆绑文件夹
Polymer build not to create bundled and unbundled folder
我不知道为什么 polymer build
不能创建 bundled and unbundled
文件夹而不会出现任何错误。
info: Clearing build/ directory...
info: (default) Building...
info: (default) Build complete!
polymer.json
{
"entrypoint": "index.html",
"shell": "src/good-app.html",
"fragments": [
"src/good-home.html",
"src/good-list-item.html",
"src/good-data.html",
"src/lazy-resources.html"
],
"sourceGlobs": [
"src/**/*",
"data/**/*",
"images/**/*",
"bower.json"
],
"includeDependencies": [
"manifest.json",
"bower_components/webcomponentsjs/webcomponents-lite.min.js"
]
}
从 polymer-cli
v0.18 开始,您可以将 "builds" 添加到 polymer.json。
"builds": [{
"name": "bundled-es6",
"bundle": true,
"js": {"minify": true, "compile": false},
"css": {"minify": true},
"html": {"minify": true}
},{
"name": "unbundled-es5",
"bundle": false,
"js": {"minify": true, "compile": true},
"css": {"minify": true},
"html": {"minify": true}
}]
https://www.polymer-project.org/2.0/docs/tools/polymer-cli#build
我不知道为什么 polymer build
不能创建 bundled and unbundled
文件夹而不会出现任何错误。
info: Clearing build/ directory...
info: (default) Building...
info: (default) Build complete!
polymer.json
{
"entrypoint": "index.html",
"shell": "src/good-app.html",
"fragments": [
"src/good-home.html",
"src/good-list-item.html",
"src/good-data.html",
"src/lazy-resources.html"
],
"sourceGlobs": [
"src/**/*",
"data/**/*",
"images/**/*",
"bower.json"
],
"includeDependencies": [
"manifest.json",
"bower_components/webcomponentsjs/webcomponents-lite.min.js"
]
}
从 polymer-cli
v0.18 开始,您可以将 "builds" 添加到 polymer.json。
"builds": [{
"name": "bundled-es6",
"bundle": true,
"js": {"minify": true, "compile": false},
"css": {"minify": true},
"html": {"minify": true}
},{
"name": "unbundled-es5",
"bundle": false,
"js": {"minify": true, "compile": true},
"css": {"minify": true},
"html": {"minify": true}
}]
https://www.polymer-project.org/2.0/docs/tools/polymer-cli#build