-
Notifications
You must be signed in to change notification settings - Fork 37
/
gulpfile.js
63 lines (50 loc) · 1.75 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const { src, dest, series } = require("gulp");
const zip = require("gulp-zip");
const clean = require("gulp-clean");
// Create a build
function cleanBuild() {
return src("./dist/build", { read: false, allowEmpty: true }).pipe(clean());
}
function cleanZip() {
return src("./dist/**.zip", { read: false, allowEmpty: true }).pipe(clean());
}
function copy_template() {
return src(["./templates/shaper_helix3/**/*.*"]).pipe(dest("dist/build/template"));
}
function copy_template_lang() {
return src("./language/en-GB/en-GB.tpl_shaper_helix3.ini").pipe(dest("dist/build/template"));
}
function copy_system_plugin() {
return src(["./plugins/system/helix3/**/*.*"]).pipe(dest("dist/build/plugins/system"));
}
function copy_system_plugin_lang() {
return src("./administrator/language/en-GB/en-GB.plg_system_helix3.ini").pipe(
dest("dist/build/plugins/system/language")
);
}
function copy_ajax_plugin() {
return src(["./plugins/ajax/helix3/**/*.*"]).pipe(dest("dist/build/plugins/ajax"));
}
function copy_installer() {
return src(["installer.script.php", "installer.xml"]).pipe(dest("dist/build"));
}
function makeTemplateZip() {
return src("./dist/build/**/*.*").pipe(zip("helix3_template.zip")).pipe(dest("./dist/"));
}
function makeSystemPluginZip() {
return src("./dist/build/plugins/system/**/*.*").pipe(zip("plg_system_helix.zip")).pipe(dest("./dist/"));
}
function makeAjaxPluginZip() {
return src("./dist/build/plugins/ajax/**/*.*").pipe(zip("plg_ajax_helix.zip")).pipe(dest("./dist/"));
}
exports.copy = series(
cleanBuild,
cleanZip,
copy_template,
copy_template_lang,
copy_system_plugin,
copy_system_plugin_lang,
copy_ajax_plugin,
copy_installer
);
exports.default = series(exports.copy, makeSystemPluginZip, makeAjaxPluginZip, makeTemplateZip, cleanBuild);