0.0.13 • Published 7 years ago

upquire v0.0.13

Weekly downloads
51
License
-
Repository
github
Last release
7 years ago

Simple require.paths alternative

Avoids relative path backtracking.

Traverses up the directory structure from the location of the file in which the call to upquire is made, and looks for the module path to require along the way. Returns the require'd if its path is found on one of the parent directories.

Installation

  1. Add upquire as a dependency to your project’s package.json
  2. Run npm install

Usage Examples

Given directory structure

`--app
   |-- lib-1
   |   `-- mymodule-1
   |-- lib-2
   |   `-- mymodule-2

From app/lib-1/my-module-1

require('upquire')('/lib-2/my-module-2')

NOTE

Please, take a look at the code and give some feedback on smarter ways of doing this.

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago