jmreidy/grunt-browserify — pull request #43 by amitayd (2013-05-12 09:10:47+00:00)
Title: Files added using externalize parameters are using relative paths

Before the change files modules were added with require() with the absolute path, resulting in module names such as "./home/amitay/code/someProject/src/someModule.js". After the change the exported module name would be something like "./src/someModule.js".
If using a file outside the project root, you might still get something like "./../../../../tmp/externalModule.js". Not sure what is the expected behaviour there, if any...

I'm not sure what is the use case for externalize with a file, as for most use cases one would use the "alias" parameter anyway.

However, it prevents different browserify results for different project locations and eliminates some minor information disclousure. It also allowed to improve the externalize test as the file path is determined.

I only tested it by running "grunt" from the repository root.