npm-watch icon indicating copy to clipboard operation
npm-watch copied to clipboard

Run on new file created

Open Dynalon opened this issue 7 years ago • 2 comments

[Feature request] It would be nice if the watcher would also trigger when new files are created, that would match a specific pattern.

For example:

package.json

"watch": {
    "copy-assets": "assets/**/*"
},
"scripts": {
   "copy-assets": "cp -R assets/ dist/"
}

That way, if new images are dropped into the assets folder, the would match the pattern and the task would re-run top copy the assets into the dist folder. The current behaviour is, that the newly created file is not picket up by the watcher.

Dynalon avatar Aug 05 '17 15:08 Dynalon

+1

lakb248 avatar Oct 13 '17 09:10 lakb248

I imagine this would have to be fixed in nodemon, since this tool doesn't do the file watching itself.

dobesv avatar Jul 26 '18 18:07 dobesv