nodemon

Nodemon is a useful cli utility that watches the current directory and restarts its node process if any files change.

$ npm i -g nodemon

Watch specific directories

$ nodemon --watch ./src --watch ./lib <entrypoint>

Ignore certain files

$ nodemon --ignore *.spec.js <entrypoint>

Watch files with specific extentions

$ nodemon -e js,json,ejs,html,css,scss <entrypoint>

Use babel-node

$ nodemon --exec babel-node <entrypoint>