Skip to content

Instantly share code, notes, and snippets.

@ahomu
Created November 19, 2012 13:31
Show Gist options
  • Save ahomu/4110645 to your computer and use it in GitHub Desktop.
Save ahomu/4110645 to your computer and use it in GitHub Desktop.
console族をgrunt-contrib-copy時にアレするソレ。minify前推奨。
/*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