-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (39 loc) · 1.15 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
44
45
var gulp = require('gulp')
, path = require('path')
, less = require('gulp-less')
, autoprefix = require('gulp-autoprefixer')
, rename = require('gulp-rename')
, uglify = require('gulp-uglify')
, quickBundle = require('./tasks/quick-bundle.js')
// SETTINGS
, less_src = "./less/*.less"
, less_paths = "./less/**/*.less"
, less_dest = "./css"
, js_src = "./src/*.json"
, js_dest = "./js"
;
gulp.task('default', ['less', 'qb']);
gulp.task('less', ['less.min']);
gulp.task('less.min', function () {
return gulp.src(less_src)
//.pipe(stripHologram())
.pipe(less({
'paths': less_paths
, 'compress': true
}))
.pipe(autoprefix({
'remove': true
}))
.pipe(rename({'extname': '.min.css'}))
.pipe(gulp.dest(less_dest))
;
});
gulp.task('qb', ['js.qb.min']);
gulp.task('js.qb.min', function() {
return gulp.src(js_src)
.pipe(quickBundle())
.pipe(uglify())
.pipe(rename({'extname': '.min.js'}))
.pipe(gulp.dest(js_dest))
;
});