@@ -4,41 +4,49 @@ const clean = require("gulp-clean");
44
55// Create a build
66function cleanBuild ( ) {
7- return src ( "./build" , { read : false , allowEmpty : true } ) . pipe ( clean ( ) ) ;
7+ return src ( "./dist/ build" , { read : false , allowEmpty : true } ) . pipe ( clean ( ) ) ;
88}
99
1010function 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
1414function 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
1818function 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
2222function 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
2626function 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
3232function 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
3636function 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
4452exports . 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