Skip to content

Instantly share code, notes, and snippets.

@floatdrop
Created August 20, 2014 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floatdrop/2c5f6751f79b44710e24 to your computer and use it in GitHub Desktop.
Save floatdrop/2c5f6751f79b44710e24 to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var watch = require('gulp-watch');
var less = require('gulp-less');
gulp.task('watch:src', function() {
watch({glob: 'styles/**/*.less'}, function(files) {
return gulp.start('styles:src');
});
});
var less = require('gulp-less');
gulp.task('styles:src', function() {
return gulp.src('styles/**/*.less')
.pipe(plumber())
.pipe(less())
.pipe(plumber.stop())
.pipe(gulp.dest('dest'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment