Created
December 21, 2016 16:32
-
-
Save afucher/b542972b551b43616f95b28bc360f9e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
const compiler = webpack(require('./webpack.config')); | |
compiler.watch({ // watch options: | |
aggregateTimeout: 300, // wait so long for more changes | |
poll: true // use polling instead of native watchers | |
// pass a number to set the polling interval | |
}, function(err, stats) { | |
console.log(stats.toString()); | |
}); | |
const nodemon = require('nodemon'); | |
nodemon({ | |
script: 'index.js', | |
ext: 'js json' | |
}); | |
nodemon.on('start', function () { | |
console.log('App has started'); | |
}).on('quit', function () { | |
console.log('App has quit'); | |
}).on('restart', function (files) { | |
console.log('App restarted due to: ', files); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment