Nodemon --ext 任何文件类型

rit*_*ter 5 javascript build nodemon

我有一个我想观看的图像目录。目录可以有许多不同的文件类型。我知道您可以为 nodemon 指定要监视的文件类型列表,但是如何告诉 nodemon 监视目录中的所有文件?我的命令现在看起来像这样:

"watch-images": "nodemon --ignore build/ -e jpg,png --watch images --exec 'cp -a images/ build/images/'"
Run Code Online (Sandbox Code Playgroud)

我可以用什么来替换jpg、png?

小智 7

使用nodemon --ext '*'观看的所有文件扩展名。它会输出:

[nodemon] watching extensions: (all)
Run Code Online (Sandbox Code Playgroud)

此功能请求中提到:

https://github.com/remy/nodemon/issues/915#issuecomment-445905946