rollup-plugin-copy
rollup-plugin-copy copied to clipboard
Watch target files with Chokidar
Fixes: #5
New PR for watching targeted files, this time using Chokidar as we discussed.
We discussed using process.on('exit', ...) to close watchers, but I found this wasn't feasible because that requires sync operations and closing Chokidar is async. I made an issue on Chokidar and they said there's no need to close them manually (see https://github.com/paulmillr/chokidar/issues/945).
Codecov Report
Merging #30 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #30 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 36 49 +13
Branches 12 14 +2
=====================================
+ Hits 36 49 +13
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/index.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 57df513...4d6431c. Read the comment docs.
Time to check this one, thank you for helping :)
I've checked and tested this a bit. Everything is fine, except glob support. Chokidar uses picomatch inside which has less features than glob package used for copying here.
I'm not sure how to solve this, need to find a way chokidar use micromatch like it was in v2. Maybe it's possible to pass glob library instance or smth like this.
This can be accomplished with rollup's addWatchFile API, no?
@bennypowers unfortunately that didn't fit all requirements, see: https://github.com/vladshcherbin/rollup-plugin-copy/pull/27#issuecomment-546780835
@vladshcherbin any update on merging this?
Bump 😃