修改相应目录下的js文件,无法触发自动重启的脚本
nodemon配置如下
{
"restartable": "rs",
"ignore": [
".git",
"test/*",
"node_modules/**/node_modules"
],
"verbose": true,
"execMap": {
"js": "node ./bin parse-tsd -c tsd-config.json"
},
"events": {
"restart": "osascript -e 'display notification \"App restarted due to:\n'$FILENAME'\" with title \"nodemon\"'"
},
"watch": [
"model",
"define",
"service"
],
"env": {
"DEBUG": "parse-tsd"
},
"ext": "js"
}
自己的问题,项目目录本身在node_modules下,nodemon默认忽略的该目录下的变化,改写nodemon的ignoreRoot配置,问题解决。