I minify javascript files on the fly and produce a .min.js file beside the existing file. This is a problem though when using ack as it treats these as .js files and searches them littering my results screen with minified javascript.
I've tried adding this to my .ackrc with no luck:
--type-set=minjs=.min.js
--nominjs
Is there any way to get ack to ignore this type of extension?
PS I do not have the option of simply renaming .min.js to .min_js or any other variation.
It looks like a limitation in App::Ack::filetypes.
The regular expression is:
if ( $filename =~ m{\.([^\.$dir_sep_chars]+)$}o ) {
That "." in there is going to block from matching anything previous.
Ack ignores min.js files as of version 1.96, so a simple upgrade will do the trick.
There is no option you need to set. The ignoring happens by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With