-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
41 lines (31 loc) · 1002 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
const gulp = require("gulp");
const zip = require("gulp-zip");
const clean = require("gulp-clean");
const VERSION = "1.0.3";
const ZIP_NAME = `mod_faq_v${VERSION}.zip`;
gulp.task("copy_module_faq", function () {
return gulp.src("./modules/mod_faq/**/*.*").pipe(gulp.dest("build/mod_faq"));
});
gulp.task("copy_lang_mod", function () {
return gulp.src(["./language/en-GB/mod_faq.ini", "./language/en-GB/mod_faq.sys.ini"])
.pipe(gulp.dest("build/mod_faq/language/en-GB/"));
});
gulp.task(
"copy",
gulp.series(
"copy_module_faq",
"copy_lang_mod",
),
);
gulp.task("zip_it", function () {
return gulp.src("./build/**/*.*").pipe(zip(ZIP_NAME)).pipe(gulp.dest("./build"));
});
gulp.task("clean_build", function () {
return gulp.src("./build", { read: false, allowEmpty: true }).pipe(clean());
});
gulp.task(
"default",
gulp.series("clean_build", "copy","zip_it", function () {
return gulp.src("./build/**/*.*").pipe(zip(ZIP_NAME)).pipe(gulp.dest("./build"));
}),
);