rooty
v2.0.0
Published
Allow root-of-project (closest package.json) requires in node with `^`
Downloads
259
Readme
rooty
Allow root-of-project (closest package.json) requires in node with ^
Usage
Require rooty as the first thing in your entry file:
var rooty = require('rooty');
rooty();
// more app code
Can also take an optional root path
rooty('./server');
And then, instead of:
var something = require('../../../../../something');
You can use:
var something = require('^something');