Grunt Uglify to compress your javascript for production deployment.
Install
npm install grunt-contrib-uglify
Example
/** * Created by Answer1215 on 11/15/2014. */ module.exports = function(grunt){ grunt.initConfig({ uglify:{ dist:{ files:{ "dist/app.min.js": "app/**/*.js" } } } }); grunt.loadNpmTasks('grunt-contrib-uglify'); }
Any js files in app folder will be output as app.min.js in dist folder.