Make ack node aware
I love ack and its very not opinionated domain ;)
But, trying to use it on a Node project without some tweaks was a nightmare. This is because, among other issues, by default, it crawled the entire node_modules directory looking for your search query.
Adding a ~/.ackrc file (or modifying your existing one) and adding the following will fix this problem:
# Make ack Node friendly :)
--ignore-dir=node_modules
--type-set=coffee=.coffee
--type-set=jade=.jade
--type-set=json=.json
These bits tell ack to ignore the node_modules directory, and to ensure it checks in some filetypes it would otherwise ignore.
Written by Victor Quinn
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Node
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#