1.0.1 • Published 9 years ago

cspify v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

cspify

Utility for Polymer, To avoid CSP issue. extract to external script file from embedded javascript code installed at bower path.

What for ?

Since you make a Chrome App with Polymer, you have two options avoid CSP issue. On the one hand, using vulcanize. on the other hand that don't use a embedded javascript in elements.

cspity will be one of the solution. It has introduced by Chrome Dev Editor to workaround the CSP issue. it works that installing polymer packages via bower, run by cspify then you can get two separated html and javascript files that we can use in develop a Chrome App without any CSP issue.

Usage

  • cspify all of html files in your bower path
cspify
  • exclusive the files by regexp pattern. default pattern is (test|demo|demo2|index).html$ if you pass other regexp pattern it will be overwritten.
cspify -e ^your-exclusive'
  • change base path that polymer elements has been installed
cspify -b fixture/bower_components

Test

For test, you should install polymer elements via bower.

cd fixture && bower install

Test to run below at root of project

npm test

Load the Chrome App under fixture to your chrome browser