Вы можете использовать grunt и grunt-contrib-uglify :
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
/*
* Minify files
*/
uglify: {
options: {
mangle: false,
compress: {
drop_console: true
}
},
my_target: {
files: [
{
src: 'app/src/**/*.js',
dest: 'app/www/myapp.min.js'
}
]
}
}
});
grunt.registerTask('minify', ['uglify']);