1.5.1 • Published 2 years ago

reroot v1.5.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

ReRoot

This library is designed to limit the require path in the specific directory

Intall

npm install reroot

Usage

// Where the cloest node_modules is
require('reroot').project_root;

// Assign where does the root '/' start from
require('reroot').search_root = "/PATH/YOU/WANT/ALL/MODULES/START";

// other module
require('/a/b/c'); // This will be resolved into "/PATH/YOU/WANT/ALL/MODULES/START/a/b/c"

// If you really wanna require files other than the the path specified
require('file:///PATH/TO/OTHER/SCRIPT');
1.5.1

2 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.2

3 years ago

1.2.3

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.9.0

3 years ago