Skip to content

Instantly share code, notes, and snippets.

@andremsantos
Created July 15, 2014 09:23
Show Gist options
  • Select an option

  • Save andremsantos/d0efe925d937d137db1a to your computer and use it in GitHub Desktop.

Select an option

Save andremsantos/d0efe925d937d137db1a to your computer and use it in GitHub Desktop.
Gulp setup for SASS
var gulp = require('gulp');
var sass = require('gulp-sass');
var notify = require('gulp-notify');
var livereload = require('gulp-livereload');
gulp.task('sass', function(){
gulp.src('./public/css/*.scss')
.pipe(sass({
errLogToConsole: false,
onError: function(err) {
return notify().write(err);
}
}))
.pipe(gulp.dest('./public/css'))
.pipe(notify({ message: 'All done, master!' }))
.pipe(livereload());
});
gulp.task('watch', function(){
gulp.watch('./public/css/*.scss', ['sass']);
});
gulp.task('default', ['watch', 'sass']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment