purplefox/vert.x — pull request #143 by nelsonsilva (2012-05-15 11:00:39+00:00)
Title: [FIX] Added suport for CommonJS modules

The test now seem to pass as expected.
There were two issues with the previous pull request:
Rhino was not loading module sources using the classloader so I'm now using cl.getResources first to lookup the js resource.
And vertxStop was not found in the global scope since I'm using requireMain. To fix this I force the export of the vertxStop function if it exists.
I've also added package.json and index.js support. There might still be some issues with it but if tests are passing I'd like to have this merged with master and send new pull requests if there's something to fix.