Created
January 23, 2018 05:03
-
-
Save mattwelke/9070b6957f56b617706cf0746669b534 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var gulp = require('gulp'); | |
var browserSync = require('browser-sync').create(); | |
// Static Server + watching css/html files | |
gulp.task('serve', ['css'], function() { | |
browserSync.init({ | |
proxy: "http://localhost:2368" | |
}); | |
gulp.watch("content/themes/casper/assets/built/*.css", ['css']); | |
gulp.watch("content/themes/casper/*.hbs").on('change', browserSync.reload); | |
}); | |
// auto-inject CSS into browsers | |
gulp.task('css', function() { | |
return gulp.src("content/themes/casper/assets/built/*.css") | |
.pipe(browserSync.stream()); | |
}); | |
gulp.task('default', ['serve']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment