Closed aalexgabi closed 6 years ago
It's not a great answer, if this is a node project, you can give it an extension, and just alias inside of your package.json (the same way nodemon does). If it's not…im not sure. Sorry.
I fould a workaround:
$ nodemon --watch file-without-extension file-without-extension
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3
This problem does still exist. The workaround is fine but it is an unexpected problem regardless
@aalexgabi The issue with that workaround is nodemon will no longer watch parent directories (using --watch /bin/www
appears files outside bin are not watched).
I created some node-based githooks and was using nodemon to rerun on changes. I added a lib folder with some shared code.
when I run nodemon -w .githooks/ .githooks/pre-commit
nodemon catches changes in .githooks/*
but does not restart when .githooks/pre-commit
is changed
I then tried nodemon -w .githooks/pre-commit
. This sees changes to .githooks/pre-commit
but nothing else.
I then tried nodemon -w .githooks/pre-commit -w .githooks/ .githooks/pre-commit
. This sees changes to .githooks/*
but not changes to .githooks/pre-commit
Frustrating...
So it should be re-opened, right?
Happy to reopen with a PR.
Submitting PR.
FWIW, my use case for this is that I need to run a script that does docker build
any time a file in the current directory changes. If I donodemon --ext "*" -x build.sh
, it doesn't restart whenDockerfile
changes . Nor does using --ext Dockerfile
work.
I have a js file without extension and when it's content changes nodemon doesn't restart it. I saw that we can specify file extension list but shouldn't the main file be supported with a shebang?
Any ideas how to fix this?