M-Zuber/npm-watch

Configure signal

Opened this issue · 4 comments

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

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

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

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?

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.