-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
43 lines (36 loc) · 1.04 KB
/
Gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
'use strict';
var gulp = require('gulp');
var less = require('gulp-less');
var cleanCSS = require('gulp-clean-css');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var changed = require('gulp-changed');
var plumber = require('gulp-plumber');
var notify = require("gulp-notify");
var PATHS = {
"less": "less"
};
function errorAlert(error) {
notify.onError({title: "Gulp Error", message: "Check your terminal", sound: "Purr"})(error); //Error Notification
console.log(error.toString());//Prints Error to Console
this.emit("end"); //End function
};
/**
* LESS
*/
gulp.task('axisj-less', function () {
gulp.src('less/*.less')
.pipe(plumber({errorHandler: errorAlert}))
.pipe(less())
.pipe(gulp.dest('.'));
gulp.src(['*.css', '!' + '*.min.css'])
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(concat('axisj.min.css'))
.pipe(gulp.dest('.'));
});
/**
* watch
*/
gulp.task('default', function () {
gulp.watch(['less/*.less', 'inc/*.less'], ['axisj-less']);
});