forked from yii-starter-kit/yii2-file-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (28 loc) · 907 Bytes
/
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
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var less = require('gulp-less');
var path = require('path');
var minifyCSS = require('gulp-minify-css');
gulp.task('js', function (done) {
gulp.src('./src/widget/assets/js/upload-kit.js')
.pipe(uglify())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('src/widget/assets/js'));
done();
});
gulp.task('less-min', function (done) {
gulp.src('./src/widget/assets/css/*.less')
.pipe(less())
.pipe(minifyCSS())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./src/widget/assets/css'));
done();
});
gulp.task('less', function (done) {
gulp.src('./src/widget/assets/css/*.less')
.pipe(less())
.pipe(gulp.dest('./src/widget/assets/css'));
done();
});
gulp.task('default', gulp.series('js', 'less', 'less-min'));