-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
44 lines (36 loc) · 886 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
33
34
35
36
37
38
39
40
41
42
43
44
let gulp = require("gulp");
let autoprefixer = require("gulp-autoprefixer");
let rename = require("gulp-rename");
let del = require("del");
var configs = {
autoprefixer: {
browsers: [
"last 2 versions",
"> 1%",
"Chrome >= 40",
"Firefox >= 40",
"ie >= 10",
"Safari >= 8",
],
},
cleanCSS: {
compatibility: "ie10",
},
};
function copyDist() {
return gulp.src("dist/**/*").pipe(gulp.dest("public"));
}
function copyAssets() {
return gulp.src("src/**/*").pipe(gulp.dest("public"));
}
function clean() {
return del(["public/**/*"]);
}
exports.clean = clean;
exports.copyDist = copyDist;
exports.copyAssets = copyAssets;
gulp.task("build", gulp.series(clean, gulp.series(copyAssets, copyDist)));
gulp.task("default", gulp.series("build"));
gulp.task("watch", function () {
gulp.watch("src/**", gulp.series("build"));
});