/node-require-externaldir

Node module similar to require but allowing usage of external directory

Primary LanguageJavaScript

reqexd

Equivalent of require, but in another dir than node_modules to be able to version custom modules.

Usage

Default include dir is "includes":

var reqexd = require('reqexd');

// foo is located at ../...../includes/foo
var foo = reqexd('foo');

Change the include dir:

var reqexd = require('reqexd');
reqexd.include_dir = "bar";

// foo is located at ../...../bar/foo
var foo = reqexd('foo');

license

MIT