Configuration based file watcher/reloader for node.js.
npm install -g node-reload
Here's a sample configuration file. Current convention is to name it "reload-config.js".
let config = {
'entry': 'test/main.js',
'args': {
'source': 'path/to/somewhere.js',
},
'watch': ['./*.js', './test/*.js'],
'log': true,
};
module.exports = config;
Load exported configuration.
node-reload "path/to/reload-config.js"
{
//This file will reload on change
"entry": String,
//Object will be convert into an argument string
"args": Object <Any>,
//Array of files to watch
"watch": Array <String>,
//Log events to console
"log": Boolean,
}