Strip console and debugger statements from JavaScript code

npm install grunt-strip-debug
6 downloads in the last week
17 downloads in the last month

grunt-strip-debug Build Status

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

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

$ npm install --save-dev grunt-strip-debug

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


Tip: the load-grunt-tasks module makes it easier to load multiple grunt tasks.


    stripDebug: {                              // task
        dist: {                                // target
            files: {                           // dictionary of files
                'dist/app.js': 'src/app.js'    // destination : source

grunt.registerTask('default', ['stripDebug']);


MIT © Sindre Sorhus

npm loves you