Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 969
ritmatter Avatar asked Nov 15 '14 19:11

ritmatter


People also ask

Where is Nodemon json file?

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.

Does nodemon ignore node_ modules?

Note that by default, nodemon will ignore the . git and node_modules/**/node_modules directories.

What is Nodemon watch?

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.


1 Answers

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

like image 172
artus9033 Avatar answered Sep 28 '22 11:09

artus9033