Skip to content

KoryNunn/rooty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

allow root-of-project (closest package.json) requires in node with `^`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •