xF4B
xF4B

Reputation: 86

Run Nodejs command when file saved

Is it possible to automaticly run a command: npm something.js when I save the something.js file? Thanks.

Upvotes: 2

Views: 3226

Answers (1)

Ramses
Ramses

Reputation: 996

You could also checkout onchange:

npm install -g onchange 

You can use it to trigger something upon saving a file:

onchange app.js -- node app.js

I use it to autoexecute files that I'm working on, for example.

Upvotes: 9

Related Questions