2017-05-07 71 views
2

我不知道为什么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" 
    ] 
} 
+1

你使用哪种版本'聚合物cli'的?在新版本'0.18'中,您需要添加一些像'--bundle'这样的属性来为文件创建捆绑文件夹,因为默认情况下它只会创建一个'default'文件夹。尝试通过输入'聚合物帮助建立' – Dmitry

回答

3

polymer-cli v0.18开始,你可以加上 “建立” 以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

+0

迷人的....列出所有可靠的选项!谢谢。 – ppshein