dust 模板更改时重新启动节点

Restart node when dust template changes

我正在使用 nodemon 在文件更改时重新启动节点。修改 .js 文件时正常,但修改 public/templates/index.dust 文件时不重启。

.nodemonignore 文件有一个 /public/* 条目,我删除了它,但仍然无法让 nodemon 在 .dust 文件更改时重新启动。想法?

Nodemon 默认只查找某些扩展。来自 https://github.com/remy/nodemon#specifying-extension-watch-list

By default, nodemon looks for files with the .js, .coffee, .litcoffee, and .json extensions. If you use the --exec option and monitor app.py nodemon will monitor files with the extension of .py. However, you can specify your own list with the -e (or --ext) switch like so:

所以我要做的是用这样的开关启动 nodemon:-e js,dust 或修改 nodemon.json 文件的 ext 属性 以包含 dust