Skip to content

Instantly share code, notes, and snippets.

@web2ls
Last active April 26, 2017 19:18
Show Gist options
  • Select an option

  • Save web2ls/6473660312a9bf325b0d56968790abd9 to your computer and use it in GitHub Desktop.

Select an option

Save web2ls/6473660312a9bf325b0d56968790abd9 to your computer and use it in GitHub Desktop.
Setup BrowserSync for Gulp configuration
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
gulp.task('liveSync', function() {
browserSync({
server: {
baseDir: './'
},
open: true,
notify: false,
port: 8000
});
});
gulp.task('html', function() {
gulp.src('index.html')
.pipe(reload({ stream: true }));
});
gulp.task('default', ['liveSync']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment