Allows for a different, more general approach to using libraries.
node-use is designed to be an easy approach to global package management,
implementing a system that functions similar to traditional
like the ones found in C#, C++, Python, etc.
npm install node-use
By default, node-use will search in the
lib directory at your code's root
when you attempt to
use a library. You can add items to the PATH by pushing
elements to the __usePATH variable:
use function takes a string, and can be used anywhere in your code, after
you have typed
use will search all existing directories
The above statement would look for the file
Additionally, if the last item in the path specified is a directory,
automatically search that directory for all
Any files found will be added to the
global object, allowing them to be utilized
globally. The file name is used to determine the key in the global object. (e.g. if the
file is named
SomeLibrary.js you could then access SomeLibrary by simply writing
Libraries are written just like node modules, using
exported from the module will be added to the global value.