Polymer in a Chrome packaged app

2020-06-06 05:12发布

With the new Material Design released by Google and Polymer being one of the best, if not only, libraries to create such a design with ease, is there anyone to develop a Chrome Packaged App using the library to get the Material Design look it provides? Currently, it gets scripted block by Google's very strict CSP

4条回答
手持菜刀,她持情操
2楼-- · 2020-06-06 05:41

Investigating ebidel response about vulcanize, I found that polybuild could be even more easy if you dont want so many extra options.

https://www.polymer-project.org/1.0/docs/tools/advanced#build

Also found this project on github that uses vulvanize with --csp option. https://github.com/PolymerLabs/polymerchromeapp

查看更多
狗以群分
3楼-- · 2020-06-06 05:46

Here is another option.

If you're big fan of Dart language, you can use https://github.com/sunglim/csp_fixer package. This package has a function to strip <script/> and create external js file.

查看更多
地球回转人心会变
4楼-- · 2020-06-06 05:47

Check out Vulcanize: http://www.polymer-project.org/articles/concatenating-web-components.html

It's a build tool for crushing HTML imports into a single file. It also has a --csp option that moves <script> into its own file. This will make CSP happy.

查看更多
萌系小妹纸
5楼-- · 2020-06-06 05:57

We're working on a template for Polymer Chrome App in the Chrome Dev Editor: https://github.com/dart-lang/chromedeveditor

I'll update this thread once the template is available. This should make Polymer dev in a Chrome app a lot easier.

查看更多
登录 后发表回答