Skip to content

Instantly share code, notes, and snippets.

@chalist
Created July 31, 2016 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chalist/76c772fbdcb8259c767c4a86014336bc to your computer and use it in GitHub Desktop.
Save chalist/76c772fbdcb8259c767c4a86014336bc to your computer and use it in GitHub Desktop.
Browser-sync & gulp
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