-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgulpfile.ts
30 lines (29 loc) · 895 Bytes
/
gulpfile.ts
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
import * as gulp from 'gulp';
import * as javascriptObfuscator from 'gulp-javascript-obfuscator';
gulp.task('build', () => {
return gulp.src([
'out/egg-example-confusion/app/*.js',
'out/egg-example-confusion/app/*/*.js',
'out/egg-example-confusion/config/*.js',
], {
base: 'out/egg-example-confusion',
})
.pipe(javascriptObfuscator({
compact: true,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
splitStrings: false,
stringArray: true,
stringArrayEncoding: false,
stringArrayThreshold: 0.75,
target: 'node',
}))
.pipe(gulp.dest('out/egg-example-confusion/'));
});