introduce
A simple wrapper around Node's regular require
function that makes it easy
to require file relative to the current script in a platform agnostic manner.
Examples
const introduce = ;const foo = ;const bar = ; // could be .js or .jsonconst foobar = ; // paths work as wellconst relativeFoo = ;const winFoo = ;
// Includes within includes pose a problem. Node sets the parent of the// innermost include to the outermost module. Thus, if '/foo.js' includes// '/lib/bar.js' which includes '/lib/sublib/baz.js', then the second include// would try to load '/baz.js'. To fix that silliness:const introduce = __dirname;const bar = ;