Created
April 25, 2016 08:03
-
-
Save sunilw/174931dc5fc0f69c9e20c95dcaabb60d 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 sass = require('gulp-sass') ; | |
var watch = require('gulp-watch') ; | |
var sourcemaps = require('gulp-sourcemaps') ; | |
var browserSync = require('browser-sync'); | |
gulp.task('watch', function () { | |
gulp.watch('./src/sass/**.scss', ['sass']); | |
}); | |
gulp.task( 'sass', function() { | |
return gulp.src('./src/sass/**.scss') | |
.pipe(sourcemaps.init()) | |
.pipe(sass().on('error', sass.logError)) | |
.pipe(sourcemaps.write('./maps')) | |
.pipe(gulp.dest('./css')) | |
.pipe(browserSync.stream()) ; | |
}) ; | |
gulp.task('bs-reload', function () { | |
browserSync.reload(); | |
}); | |
gulp.task('serve', function() { | |
browserSync({ | |
files: "css/*.css", | |
proxy : 'http://aucklandcitylaw' | |
}); | |
gulp.watch("./*.html").on('change', browserSync.reload); | |
gulp.watch("./css/**").on('change', browserSync.reload); | |
}); | |
gulp.task('default', ['sass', 'watch']) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment