aitoroses / vulcanize-loader

Polymers vulcanize tool loader for webpack
24 stars 8 forks source link

Ability to watch Files / Folders #2

Closed caleblloyd closed 7 years ago

caleblloyd commented 7 years ago

Thanks for the nice loader. This PR adds file/folder watching so that vulcanize will re-run when elements change. Example syntax:

require("vulcanize?compress=true&base=/lib&watchFolders=./elements|./elements2&watchFiles=./elements3/a.html|./elements3/b.html!./imports.html");
// => returns i. e. "/lib/imports.html"
//    rebuilds when any file in ./elements or ./elements2 changes
//    rebuilds when ./elements3/a.html or ./elements3/b.html changes

You can try out the package by changing your packages.json:

"vulcanize-loader": "git+https://github.com/caleblloyd/vulcanize-loader#transpiled"

aitoroses commented 7 years ago

Hi @caleblloyd, I've tested it out and it seems to work perfectly. I will merge the transpiled branch to master.

Thank you so much for your contrib! 😄

aitoroses commented 7 years ago

vulcanize-loader@1.2.1 is available 😉