2

Ok I'm new to Polymer, after seeing the main page and Google IO 2016 video, I wanted to try it out, and right now I created a basic web application with it.

I managed to get it build and running it through the "polymer serve" command, but now that I want to release it to a production environment (I have an nginx cluster), how do I build the application to just a bunch of static website files?

I executed "polymer build" and I see the build folder and it contains 2 folders: bundled and unbundled, and inside them there are the bower_components, src and test folders as well as other stuff for running it through "polymer serve" but there's not a build/dist of build/static folder that I can copy into nginx so the application is served through it.

BTW, what I mean about a dist folder is without a readme, bower.json, test, bower_components, etc. just the pure needed HTML, CSS, JS, etc files that need to be served through nginx (or any other web server) as static file web content.

I went through the documentation but there's no details on how to do such task.

Any suggestions on how to build a static content folder for serving my polymer web app through nginx?

Thanks!

4

1 回答 1

1

从 Polymer-CLI v0.11.0 开始,没有内置方法可以从包中过滤掉文件,但它是一个请求的特性。此外,构建输出当前包括无关文件(一个错误),例如test目录。

作为替代方案,您可以使用Polymer Starter Kit 1.3.0,其dist文件夹不包含额外文件(尽管它确实包含所需 bower_components的原样)。

于 2016-06-12T22:37:08.670 回答