10

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?

ritmatter
  • 3,448
  • 4
  • 24
  • 43

1 Answers1

13

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

Alberto Anderick Jr
  • 1,129
  • 7
  • 24
artus9033
  • 591
  • 8
  • 20