Skip to content

Instantly share code, notes, and snippets.

@yabbes
Created August 10, 2017 12:09
Show Gist options
  • Save yabbes/7b48f40548f44922f7b7e05f3dd99a8f to your computer and use it in GitHub Desktop.
Save yabbes/7b48f40548f44922f7b7e05f3dd99a8f to your computer and use it in GitHub Desktop.
Simple Gulp (browser-sync and gulp-watch for html/css changes)
// Super simple gulpfile just with browser-sync and gulp-watch
var gulp = require('gulp');
var browserSync = require('browser-sync');
var watch = require('gulp-watch');
gulp.task('default', function () {
watch(['./*.css', './*.html'], function() {
browserSync.reload();
console.log('HTML or CSS changed => Browser-Sync reload');
});
browserSync.init({
server: {
baseDir: "./"
}
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment