/**
 * Created by jun on 2017/8/23.
 */
var gulp = require('gulp'),
    less = require('gulp-less');
    //当发生异常时提示错误 确保本地安装gulp-notify和gulp-plumber
    notify = require('gulp-notify'),
    plumber = require('gulp-plumber');

gulp.task('less', function () {
    gulp.src('manage/less/*.less')
        .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
        .pipe(less())
        .pipe(gulp.dest('manage/css'));
});
gulp.task('watch', function () {
    gulp.watch('manage/less/**/*.less', ['less']);
});