javascriptbuildnodemon

Nodemon --ext any file type


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?


Solution

  • 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