Skip to content

Instantly share code, notes, and snippets.

@mccombs
Last active August 29, 2015 14:19
Show Gist options
  • Save mccombs/822a590f4c89230cada3 to your computer and use it in GitHub Desktop.
Save mccombs/822a590f4c89230cada3 to your computer and use it in GitHub Desktop.
Take a big Gulp!
var gulp = require('gulp'),
less = require('gulp-less'),
livereload = require('gulp-livereload'),
notify = require('gulp-notify');
minifycss = require('gulp-minify-css');
gutil = require('gulp-util');
gulp.task('less', function() {
return gulp.src(['../blog/css/*.less'], {base: '../blog/css/'})
.pipe(less().on('error', function(err){
gutil.log(err);
return notify().write(err);
this.emit('end');
}))
.pipe(minifycss())
.pipe(livereload())
.pipe(gulp.dest('../blog/css/'))
});
gulp.task('watch', function() {
livereload.listen();
gulp.watch('../blog/css/*.less', ['less']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment