Skip to content

Instantly share code, notes, and snippets.

@biwin
Created November 18, 2015 15:43
Show Gist options
  • Save biwin/63fb08952e83bf69569d to your computer and use it in GitHub Desktop.
Save biwin/63fb08952e83bf69569d to your computer and use it in GitHub Desktop.
gulpfile to reload and compile sass files
var gulp = require('gulp');
var sass = require('gulp-sass');
var livereload = require('gulp-livereload');
gulp.task('sass', function () {
gulp.src('scss/*.scss')
.pipe(sass({outputStyle: 'compressed'}))
.pipe(gulp.dest('css'))
.pipe(livereload());
});
gulp.task('default', function() {
livereload.listen();
gulp.watch(['*.html']).on('change', livereload.changed);
gulp.watch('scss/*.scss', ['sass']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment