cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.8k stars 128 forks source link

Any way to send no signals to daemon process #28

Closed deepakjois closed 8 years ago

deepakjois commented 8 years ago

I am using webpack --watch as a daemon command in my modd.conf file. It appears that sending SIGHUP to webpack kills the process, which is not the behavior I want.

Webpack is capable of figuring out that files changed and do a recompile by itself. So what I really want is for the daemon process to not receive any signal. Right now, I can hack it up by sending SIGWINCH.

Here is my modd.conf FWIW:

src/** {
  daemon +sigwinch: webpack -d --watch
}

build/** {
  daemon: devd -m ./build
}

src/**/*.js webpack.config.babel.js !src/static/js/*.js {
  prep: node_modules/.bin/eslint --fix @mods
}
deepakjois commented 8 years ago

Maybe add an option none to not send any signals to daemons:

src/** {
  daemon +none: webpack -d --watch
}
cortesi commented 8 years ago

If you put the webpack daemon in a block without any match pattern, it will run on startup but never receive change notifications:

{
    daemon: webpack -d --watch src
}

Does this do what you want?

deepakjois commented 8 years ago

Yes it does. I guess I missed it in the README