My personal more convenient version of nodemon
I wanted an easier way to rerun an arbitrary command when files change, like nodemon but more convenient, especially for non-JS projects.
For me the easiest syntax to use/remember looks like this:
rerun 'src/**.{c,h,cpp}' -- ./build.sh
yarn install @jedwards1211/rerun
rerun <files, directories, glob patterns ...> -- <command>
Any number of directories/glob patterns can be given, and any number of command arguments, they just have to
be separated by --
.
If you omit the --
, it assumes you everything is the command and tries to intelligently watch all files that
aren't .gitignore
d.
If you want to run a shell command, you may have to quote it.
Right now there are no options. It will SIGTERM the command before restarting if it's still running.