build-workflow
Advanced tools
Changelog
v0.1.7
Add console-filter - 4ecacc7, royriojas, 30/01/2015 02:55:57
Usage
grunt --console-filter=regular_expression
where regular_expression
can be any valid regular expression
If a filter is provided all the console methods that match will be kept. The ones that do not match will be removed from the final output.
A method will match if one its arguments (as text) matches the value of the filter. e.g.
console.log('some method');
console.log('another method');
And you run
grunt --console-filter=some
this will keep the console.log('some method')
and will remove the other one.
Note: It will also keep the console calls from a file with the name that matchs the filter
In the previous example the filter will also keep console methods calls from a file called some.js or somexxxx.js file