forked from JoomShaper/helix-ultimate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
61 lines (50 loc) · 1.9 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
var gulp = require('gulp');
var zip = require('gulp-zip');
var clean = require('gulp-clean');
var pump = require('pump');
// Copy template
gulp.task('copy_tmpl', function(){
return gulp.src(['./templates/shaper_helixultimate/**/*.*', '!./templates/shaper_helixultimate/en-GB.tpl_shaper_helixultimate.ini'])
.pipe(gulp.dest('build/template'))
});
// Copy Template Language
gulp.task('copy_tmpl_lang', function(){
return gulp.src(['./language/en-GB/en-GB.tpl_shaper_helixultimate.ini'])
.pipe(gulp.dest('build/template'))
});
// Copy system plugin
gulp.task('copy_system_plugin', function(){
return gulp.src(['./plugins/system/helixultimate/**/*.*', '!./plugins/system/helixultimate/language/en-GB.plg_system_helixultimate.ini'])
.pipe(gulp.dest('build/plugins/system'))
});
// Copy system plugin Language
gulp.task('copy_system_plugin_lang', function(){
return gulp.src(['./administrator/language/en-GB/en-GB.plg_system_helixultimate.ini'])
.pipe(gulp.dest('build/plugins/system/language'))
});
// Copy Installer
gulp.task('copy_installer', function(){
return gulp.src(['./helix-installer/**/*.*'])
.pipe(gulp.dest('build/'))
});
gulp.task('copy', ['copy_tmpl', 'copy_tmpl_lang', 'copy_system_plugin', 'copy_system_plugin_lang', 'copy_installer']);
gulp.task('build', ['copy'], function(){
return gulp.src('./build/**/*.*')
.pipe(zip('helix-ultimate.zip'))
.pipe(gulp.dest('./'))
});
gulp.task('zip_it', function(){
return gulp.src('./build/**/*.*')
.pipe(zip('helix-ultimate.zip'))
.pipe(gulp.dest('./'))
});
gulp.task('clean_build', function () {
return gulp.src('./build', {read: false})
.pipe(clean());
});
gulp.task('clean_zip', function () {
return gulp.src('./helix-ultimate.zip', {read: false})
.pipe(clean());
});
gulp.task('default', [ 'build' ]);
gulp.task('clean', [ 'clean_build', 'clean_zip' ]);