grunt-strip-debug

Strip console and debugger statements from JavaScript code

grunt-strip-debug

Strip console, alert, and debugger statements from JavaScript code with strip-debug

$ npm install --save-dev grunt-strip-debug
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks 
 
grunt.initConfig({
stripDebug: {
dist: {
files: {
'dist/app.js': 'src/app.js'
}
}
}
});
 
grunt.registerTask('default', ['stripDebug']);

MIT © Sindre Sorhus