I wrote a patch that adds *.min.js to the ignore list.
You may review it here:
https://github.com/petdance/ack/pull/142
Cheers,
Ori
> I wrote a patch that adds *.min.js to the ignore list.
I don't see that this is a case where we always want to ignore it. If I'm searching for all instances of foo in my source tree, foo showing up in whatever.min.js counts.
xoa
--
Andy Lester => an...@petdance.com => www.theworkinggeek.com => AIM:petdance
Does Minified count as source code or as 'compiled' 'object' code?
--
Bill
n1...@arrl.net bill....@gmail.com
Minified javascript code shouldn't be edited by hand, and is stripped of
all meaningful variable names, comments and whitespace that make it
humanly readable. Doing so would require a lot of work de-obfuscating it.
And since Javascript is an interpreted language that doesn't have an
intermediary byte-code stage, I think it's safe to regard it as
"compiled object code".
I've raised this issue before. I'm 100% +1 on this one. Minified JS is
always garbage in the pager.
Sounds like treating this as the moral equivalent of uuencoded binary
is correct.
We should check out the patch (and if it patches the Doc too)
oops, no tuits ....
--
Bill
n1...@arrl.net bill....@gmail.com
What about if you have a .min.js from an outside source that wasn't compiled yourself?
There's plenty of them here: http://cachedcommons.org/
Look at the (min) links versus the un-minified versions.
Note that that site uses foo-min.js instead of foo.min.js. Does the
patch handle that too?
> What about if you have a .min.js from an outside source that wasn't compiled yourself?
It's still not going to be useful to ack it.
--
Chris Madsen pe...@cjmweb.net
-------------------- http://www.cjmweb.net --------------------
I vote for /[-._]min\.js$/
I suppose it's possible to get an outside .min.js, but that's going to
be the exception rather than the rule. Personally, I don't want
minified js or css showing up in ack because it's not much better than
grepping a binary file.
Cheers,
Ovid