Failed to load latest commit information.
coffee Allow passing in the main.js file's require for use in proper module … Aug 9, 2011
scripts Make sure require('requirejs') works in node repl, and switch the emb… Aug 14, 2011

A test of embedding requirejs as a module in a node project, but delegates to Node's require() when it cannot find a file. Make sure the path resolution for Node's require is from the perspective of the main.js file, and not the requirejs module.


  • mkdir node_modules
  • npm install coffee-script uglify-js

Make sure there is a node_modules/requirejs directory with a package.json that has a 'main': 'bin/r.js' property, and create a bin directory with a symlink to the project's basedir/r.js file inside the bin directory.

Tested with Node 0.4.9