M-Zuber / npm-watch

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

Configure signal #55

Open dobesv opened 6 years ago

dobesv commented 6 years ago

It would be nice to be able to specify the signal argument to nodemon, e.g. to set SIGTERM instead of the default SIGUSR1.

M-Zuber commented 5 years ago

This is an area I am unfamiliar with. Could you please provide a bit more context?

dobesv commented 5 years ago

When you run nodemon you can pass a command-line parameter signal. I think when you run it using the API there must be a similar option. However, I don't think you can specify this as part of the npm-watch configuration. My suggestion is to add an npm-watch option signal which is passed through to nodemon as its signal option.

For example, see https://github.com/remy/nodemon#gracefully-reloading-down-your-script

M-Zuber commented 5 years ago

We are not using the api (yet?) but it looks like it should be possible to just add another option to the config

Will try and get to it soon, unless you want to give it a shot?

dobesv commented 5 years ago

TBH I've forgotten why I asked for this feature. I think I've since switched to just running nodemon directly myself as a yarn script. If nobody else has a use for it you can just close this or leave it until you get some more "thumbs up" on it or something.