-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (35 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
44
/* ----------------------------------------------------------
Vars
---------------------------------------------------------- */
const gulp = require('gulp');
const del = require('del');
const {
series
} = gulp;
const minify = require("gulp-minify");
/* ----------------------------------------------------------
Del
---------------------------------------------------------- */
function clean() {
return del("js/*.min.js");
}
exports.clean = clean;
/* ----------------------------------------------------------
Minify
---------------------------------------------------------- */
function minifyjs() {
return gulp.src('js/*.js')
.pipe(minify({
noSource: true,
ext: {
min: '.min.js'
},
ignoreFiles: ['*.min.js']
}))
.pipe(gulp.dest('js'));
}
exports.minifyjs = minifyjs;
/* ----------------------------------------------------------
Default tasks
---------------------------------------------------------- */
exports.default = series(clean,minifyjs);