National Patience Month

    rooty

    2.0.0 • Public • Published

    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');
     

    Install

    npm i rooty

    DownloadsWeekly Downloads

    109

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • mauricebutler
    • korynunn