Nodemon --ext any file type

6.8k Views Asked by At

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?

1

There are 1 best solutions below

3
On BEST ANSWER

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