+1 CommonJS, although at the moment it's not an easy thing to do. Eventually the asset sharing toolchain should let us do CommonJS modules easily in Rails/Node/anything.