Skip to content

Instantly share code, notes, and snippets.

@sajadtorkamani
Created November 27, 2019 19:21
Show Gist options
  • Save sajadtorkamani/1a34f41801ca8a2b12e72430501dabed to your computer and use it in GitHub Desktop.
Save sajadtorkamani/1a34f41801ca8a2b12e72430501dabed to your computer and use it in GitHub Desktop.
gulp-livereload
const { watch } = require('gulp');
const livereload = require('gulp-livereload');
const watchPaths = ['app/assets', 'app/views'];
const reloadBrowser = cb => {
console.log('Reloading browser...');
livereload.reload();
cb();
};
exports.default = function() {
livereload.listen();
watch(watchPaths, reloadBrowser);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment