Skip to content

Commit 0aaa6f1

Browse files
committed
updated build functionality
1 parent 148c3dc commit 0aaa6f1

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ web.config.txt
1919
/cli
2020
/components
2121
/images
22+
/dist
2223
/includes
2324
/layouts
2425
/libraries

gulpfile.js

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,49 @@ const clean = require("gulp-clean");
44

55
// Create a build
66
function cleanBuild() {
7-
return src("./build", { read: false, allowEmpty: true }).pipe(clean());
7+
return src("./dist/build", { read: false, allowEmpty: true }).pipe(clean());
88
}
99

1010
function cleanZip() {
11-
return src("./helix3_template.zip", { read: false, allowEmpty: true }).pipe(clean());
11+
return src("./dist/**.zip", { read: false, allowEmpty: true }).pipe(clean());
1212
}
1313

1414
function copy_template() {
15-
return src(["./templates/shaper_helix3/**/*.*"]).pipe(dest("build/template"));
15+
return src(["./templates/shaper_helix3/**/*.*"]).pipe(dest("dist/build/template"));
1616
}
1717

1818
function copy_template_lang() {
19-
return src("./language/en-GB/en-GB.tpl_shaper_helix3.ini").pipe(dest("build/template"));
19+
return src("./language/en-GB/en-GB.tpl_shaper_helix3.ini").pipe(dest("dist/build/template"));
2020
}
2121

2222
function copy_system_plugin() {
23-
return src(["./plugins/system/helix3/**/*.*"]).pipe(dest("build/plugins/system"));
23+
return src(["./plugins/system/helix3/**/*.*"]).pipe(dest("dist/build/plugins/system"));
2424
}
2525

2626
function copy_system_plugin_lang() {
2727
return src("./administrator/language/en-GB/en-GB.plg_system_helix3.ini").pipe(
28-
dest("build/plugins/system/language")
28+
dest("dist/build/plugins/system/language")
2929
);
3030
}
3131

3232
function copy_ajax_plugin() {
33-
return src(["./plugins/ajax/helix3/**/*.*"]).pipe(dest("build/plugins/ajax"));
33+
return src(["./plugins/ajax/helix3/**/*.*"]).pipe(dest("dist/build/plugins/ajax"));
3434
}
3535

3636
function copy_installer() {
37-
return src(["installer.script.php", "installer.xml"]).pipe(dest("build"));
37+
return src(["installer.script.php", "installer.xml"]).pipe(dest("dist/build"));
3838
}
3939

40-
function makeZip() {
41-
return src("./build/**/*.*").pipe(zip("helix3_template.zip")).pipe(dest("./"));
40+
function makeTemplateZip() {
41+
return src("./dist/build/**/*.*").pipe(zip("helix3_template.zip")).pipe(dest("./dist/"));
42+
}
43+
44+
function makeSystemPluginZip() {
45+
return src("./dist/build/plugins/system/**/*.*").pipe(zip("plg_system_helix.zip")).pipe(dest("./dist/"));
46+
}
47+
48+
function makeAjaxPluginZip() {
49+
return src("./dist/build/plugins/ajax/**/*.*").pipe(zip("plg_ajax_helix.zip")).pipe(dest("./dist/"));
4250
}
4351

4452
exports.copy = series(
@@ -51,4 +59,5 @@ exports.copy = series(
5159
copy_ajax_plugin,
5260
copy_installer
5361
);
54-
exports.default = series(exports.copy, makeZip, cleanBuild);
62+
63+
exports.default = series(exports.copy, makeSystemPluginZip, makeAjaxPluginZip, makeTemplateZip, cleanBuild);

0 commit comments

Comments
 (0)