substack/node-browserify — pull request #324 by balupton (2013-03-13 00:47:53+00:00)
Title: Added the ability to require dependencies relative to the cwd

We have a fairly complicated project tree and we'd like to be able to require things with browserify relative to the cwd. So instead of writing `require('../../../../../app/out/models/mockup.js')` which is prone to change, we can write `require('app/out/models/mockup.js')` instead which is far less prone to change.

Another way to do this could be:

```
module.paths.push(process.cwd());
// ...
parent.paths = parent.paths.concat(module.paths);
```

or via an option.

It seems something like this is intended with https://github.com/balupton/node-browserify/blob/7ae499aa71f23d146af9d2dbd4e2f41403c9e218/index.js#L50 but I may be wrong about that.