Gulp plugin for javascript-obfuscator.
Install the package with NPM:
npm install --save gulp-javascript-obfuscator
var gulp = require('gulp'),
javascriptObfuscator = require('gulp-javascript-obfuscator');
gulp.src('file.js')
.pipe(javascriptObfuscator())
.pipe(gulp.dest('dist'));
Pass any options available in the obfuscator.
gulp.src('file.js')
.pipe(javascriptObfuscator({
compact:true,
sourceMap: true
}))
.pipe(gulp.dest('dist'));
Using sourceMap option with value set to true will also output a .map file to Gulp stream.