我想以yarn dev
监视模式运行以启动 pm2 和 webpack 进行开发。yarn pm2:del
问题是当我手动按下“CTRL+C”终止时,我需要终止 pm2 实例(运行)。怎么做到呢?
包.json:
"scripts": {
"dev": "yarn pm2:del && yarn pm2:dev && yarn wp:dev",
"pm2:dev": "pm2 start ecosystem.config.js --only dev",
"pm2:del": "pm2 delete all || exit 0",
"wp:dev": "webpack --mode=development --watch"
}