requirein

A require() that works in a specified directory.

Downloads
24
Stars
17
Committers
1

requirein(path, name)

Use node's require function as if the file you're requiring from is in another target directory.

var requirein = require('requirein')
  , pwd = process.env.PWD
  , request = requirein(pwd, 'request')
  ;

Credits to Bradley Meck for figuring this out and writing the original code.