substack/node-browserify — pull request #164 by runningskull (2012-06-07 21:28:42+00:00)
Title: Add 'noParse()' for files that should be bundled, but not parsed/walked.

It's been discussed a few times that `ignore()` doesn't quite do what the docs say it does. I really wanted the documented functionality, however other people seem to be using it in its current incarnation. So rather than change it, I elected to add `noParse()` to get the same effect, w/o any loss in functionality.

Caching and [Issue 90](https://github.com/substack/node-browserify/issues/90) seem to have helped speed things up a good bit, but it's still (understandably) a little slow w/ large files on first run & parsing unnecessary files is a large, preventable part of the reason.

It's particularly helpful when including large files (ie. jQuery, Backbone, etc) that you know don't need to be parsed at all (though also helpful w/ many small files like jQuery plugins). I can verify empirically that this helps speed up the processing of a small app w/ large includes a great deal, even w/o caching turned on.

It's relatively little code, but certainly a non-trivial change to functionality, plus adds CLI params, etc... I basically tried to mirror the way `ignore()` works as much as possible, but I'm happy to discuss/implement better ways of going about it if this isn't the best approach.

Also, I added documentation, but it probably should be cleaned up. Happy to do it, just need some suggestions on how to make it better.