Created
July 31, 2016 12:48
-
-
Save chalist/76c772fbdcb8259c767c4a86014336bc to your computer and use it in GitHub Desktop.
Browser-sync & gulp
This file contains hidden or 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
var gulp = require('gulp'); | |
var bs = require('browser-sync').create(); | |
gulp.task('browser-sync', [], function() { | |
bs.init({ | |
server: { | |
baseDir: "./" | |
} | |
}); | |
}); | |
gulp.task('default', ['browser-sync'], function () { | |
gulp.watch("*.html").on('change', bs.reload); | |
gulp.watch("*.js").on('change', bs.reload); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment