M-Zuber / npm-watch

run npm scripts when files change
MIT License
323 stars 38 forks source link

Feature: pass multiple scripts on the command line #88

Open dobesv opened 2 years ago

dobesv commented 2 years ago

You can watch everything by passing no arguments to npm-watch, or watch just one script by giving it as a command line argument.

npm-watch has a certain amount of fixed overhead to run (~100MB of RAM).

In our project we watch a subset of things that can be watch, by running npm-watch once per script. If npm-watch allowed multiple scripts to be specified as arguments, we could avoid the overhead of multiple npm-watch processes because the core watching code and dependencies would only be loaded into memory once.