Skip to content

Instantly share code, notes, and snippets.

@inanutshell86
Last active January 11, 2017 12:07
Show Gist options
  • Save inanutshell86/864d8710657809b9183046d4df95d4e7 to your computer and use it in GitHub Desktop.
Save inanutshell86/864d8710657809b9183046d4df95d4e7 to your computer and use it in GitHub Desktop.
gulp-browser-sync
var gulp = require("gulp"),
browserSync = require('browser-sync');
gulp.task('server', function () {
browserSync({
port: 9000,
server: {
baseDir: 'app'
}
});
});
gulp.task('watch', function () {
gulp.watch([
'app/*.html',
'app/js/**/*.js',
'app/css/**/*.css'
]).on('change', browserSync.reload);
});
gulp.task('default', ['server', 'watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment