Created
November 27, 2019 19:21
-
-
Save sajadtorkamani/1a34f41801ca8a2b12e72430501dabed to your computer and use it in GitHub Desktop.
gulp-livereload
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 { 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