substack/node-browserify — pull request #415 by RobertWHurst (2013-06-02 03:39:26+00:00)
Title: Allow passing opts to constructor, and add.

Currently there doesn't seem to be a nice way to tell browserify the correct base directory; There is no way to pass opts at all.

For my use case, I use browserify programmatically to dynamically generate javascript packages for the client side my application; a large multiplayer game engine. The problem is that proccess.cwd() points to my parent module, but browserify is use in a sub module that has a different root. This allows one to pass my own basedir, as well as any other options I may wish to pass to browserify's require().