Created
November 19, 2012 13:31
-
-
Save ahomu/4110645 to your computer and use it in GitHub Desktop.
console族をgrunt-contrib-copy時にアレするソレ。minify前推奨。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global module:false*/ | |
module.exports = function (grunt) { | |
grunt.initConfig({ | |
copy: { | |
js: { | |
files: { | |
'../public/js' : 'js/app-all.min.js' | |
}, | |
options: { | |
processContent: function(content) { | |
return content.replace(/console.[\w]+\(.*?(\w*\(.*\))*\);/g, ''); | |
} | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment