-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (38 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
45
const gulp = require("gulp"),
tar = require("gulp-tar"),
gzip = require("gulp-gzip"),
del = require("del");
gulp.task("package-core", function () {
return gulp.src("./core/**")
.pipe(tar("core.tar"))
.pipe(gzip())
.pipe(gulp.dest("temp"));
});
gulp.task("package-system", function () {
return gulp.src("./system/**")
.pipe(tar("system.tar"))
.pipe(gzip())
.pipe(gulp.dest("temp"));
});
gulp.task("package-cp", function () {
return gulp.src("./cp/**")
.pipe(tar("cp.tar"))
.pipe(gzip())
.pipe(gulp.dest("temp"));
});
gulp.task("package-frontend", function () {
return gulp.src("./frontend/**")
.pipe(tar("frontend.tar"))
.pipe(gzip())
.pipe(gulp.dest("temp"));
});
gulp.task("clean", function () {
return del("temp/");
});
gulp.task("package", ["package-core", "package-system", "package-cp", "package-frontend"], function () {
return gulp.src(["temp/*.tar.gz", "index.js", "package.json", "config.example.json"])
.pipe(tar("websuite.tar"))
.pipe(gzip())
.pipe(gulp.dest("dist"));
});
gulp.task("default", ["package"]);