{
...,
"scripts": {
"watch-ts": "nohup npx tsc --watch >> watch_ts.log 2>&1 &",
"watch-js": "nohup npx nodemon dist/index.js >> watch_js.log 2>&1 &",
"dev": "npm run watch-ts; npm run watch-js; tail -f watch_ts.log -f watch_js.log"
},
...
}
$ npm run dev
This will kill both processes(tsc & nodemon) once you kill the parent process(npm run dev)
This will kill both processes(tsc & nodemon) once you kill the parent process(npm run dev)