M-Zuber / npm-watch

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

Couldn't find a way to run subset of scripts (but still more than one script) #80

Open wontheone1 opened 3 years ago

wontheone1 commented 3 years ago

First of all, thank you for maintaining useful open source project.

I am in a monorepo situation(fullstack in one repo) and using alt-JS(Rescript) so I should watch compile and also hot reloading.

To make long story short,

"watch:" {
  "a": "glob",
  "b": "glob",
  "c": "glob",
  "d": "glob"
}

I wanna watch a & b at a same time, and then c & d separately. I couldn't find a way to do this with this tool. Is it correct? If yes, would you please consider adding this feature?

wontheone1 commented 3 years ago

Another thing it could be nice to have is the option to run scripts sequentially. like running "b" only after "a" etc... (in the example above)

M-Zuber commented 3 years ago

This is something I will consider to a future release, but I cannot commit to a specific timeframe right now. I would be happy to review a PR though, if you up to making that contribution.

Another thing it could be nice to have is the option to run scripts sequentially. like running "b" only after "a" etc... (in the example above)

I am not sure how feasible this is, but either way, if it is still something you are interested in, please open a dedicated issue for it.