The current implementation is in the commonjs-shell-2 branch in my
github repository:
https://github.com/hns/rhino-opt/tree/commonjs-shell-2
This adds 3 new options to the Rhino shell:
-modules [module-uris]
Use CommonJS modules with given search path
-main [module] Set CommonJS main module id or file name
-sandbox Enable CommonJS sandbox mode
I've worked with Narwhal and Jack to make the implementation work with
real-world usage patterns and conventions (though the code is not
limited or even targeted towards Narwhal). Here's a simple script for
launching the Jack demo application:
https://gist.github.com/897609
If you try it out please let me know what you find.
Hannes