Skip to content

Instantly share code, notes, and snippets.

@mccombs mccombs/Gulp

Last active Aug 29, 2015
Embed
What would you like to do?
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
You can’t perform that action at this time.