Created
November 27, 2019 19:40
-
-
Save sajadtorkamani/db82fede419bf210f022bb451153b341 to your computer and use it in GitHub Desktop.
Browsersync
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 browserSync = require('browser-sync').create(); | |
const reloadBrowser = cb => { | |
browserSync.reload(); | |
cb(); | |
}; | |
exports.default = function() { | |
browserSync.init({ proxy: 'http://localhost:3000' }); | |
watch(['app/assets', 'app/views'], reloadBrowser); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment