Obfuscate JavasScript via http://packer.50x.eu - This submits the source to the website and returns the result. Contents can be piped.
npm install gulp-packer50x
var packer50x = require('gulp-packer50x');
gulp.task('scripts', function() {
gulp.src('./lib/*.js')
.pipe(packer50x({
mode: "normal", // (Optional - default: "normal"; Possible Values - "none", "numeric", "normal", "extended")
}))
.pipe(gulp.dest('./dist/'));
});
mode - defaults to normal
none
numeric
normal
extended