-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gulpfile.js
45 lines (38 loc) · 1.36 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
const gulp = require('gulp'),
uglify = require('gulp-uglify-es').default,
javascriptObfuscator = require('gulp-javascript-obfuscator');
var minify_config_js = function() {
return gulp.src('./public/config/*.js')
.pipe(uglify())
.pipe(gulp.dest('./public/dist/config/'));
}
exports.minify_config_js = minify_config_js;
var obfuscate_config_js = function() {
return gulp.src('./public/config/*.js')
.pipe(javascriptObfuscator())
.pipe(gulp.dest('./public/dist/config/'));
}
exports.obfuscate_config_js = obfuscate_config_js;
var deploy_config_js = function() {
return gulp.src('./public/dist/config/*.js')
.pipe(gulp.dest('./public/config/'));
}
exports.deploy_config_js = deploy_config_js;
var minify_libs_js = function() {
return gulp.src('./public/libs/*.js')
.pipe(uglify())
.pipe(gulp.dest('./public/dist/libs/'));
}
exports.minify_libs_js = minify_libs_js;
var obfuscate_libs_js = function() {
return gulp.src('./public/libs/*.js')
.pipe(javascriptObfuscator())
.pipe(gulp.dest('./public/dist/libs/'));
}
exports.obfuscate_libs_js = obfuscate_libs_js;
var deploy_libs_js = function() {
return gulp.src('./public/dist/libs/*.js')
.pipe(gulp.dest('./public/libs/'));
}
exports.deploy_libs_js = deploy_libs_js;
gulp.task('deploy_all', gulp.series(obfuscate_config_js, deploy_config_js, obfuscate_libs_js, deploy_libs_js))