Created
August 10, 2017 12:09
-
-
Save yabbes/7b48f40548f44922f7b7e05f3dd99a8f to your computer and use it in GitHub Desktop.
Simple Gulp (browser-sync and gulp-watch for html/css changes)
This file contains 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
// 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