A CommonJS preprocessor that builds you CommonJS style app into code the browser can use.
$ npm install common.js
module.exports = function() {
console.log('foo');
};
var foo = require('foo');
exports.doTheThing = function() {
foo();
};
$ commonjs --src ./path/to/javascripts --dest ./path/to/js --client
<script src="js/common.js"></script>
<script src="js/foo.js"></script>
<script src="js/bar.js"></script>
<script>
var bar = require('bar');
bar.doTheThing();
</script>
require.load('/foo', '/bar', '/baz').then(function() {
var foo = require('foo');
var bar = require('bar');
var baz = require('baz');
foo.doStuffWith(bar.foo(), baz.foo());
});