I have an images directory that I want to watch. The directory can have many different file types. I know you can specify a list of file types for nodemon to watch, but how can I tell nodemon to watch ALL files in a directory? My command looks like this right now:
"watch-images": "nodemon --ignore build/ -e jpg,png --watch images --exec 'cp -a images/ build/images/'"
What can I use to replace the jpg,png?
From the official documentation and github page: nodemon supports local and global configuration files. These are usually named nodemon. json and can be located in the current working directory or in your home directory.
Note that by default, nodemon will ignore the . git and node_modules/**/node_modules directories.
nodemon will watch the files in the directory that nodemon was started, and if they change, it will automatically restart your node application. nodemon does not require any changes to your code or method of development. nodemon simply wraps your node application and keeps an eye on any files that have changed.
Use nodemon --ext '*'
to watch for all file extensions. It'll output:
[nodemon] watching extensions: (all)
Mentioned in this feature request:
https://github.com/remy/nodemon/issues/915#issuecomment-445905946
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With