Requiry
Requiry checks process.env.NODE_ENV, and if you are in a "dev" environment, it
will auto-install packages when you require
packages that are not installed.
Installation
In your project directory, run:
npm i --save requiry
Getting Started
To use Requiry, you simply need to require it, then require a package which may or may not be installed.
; var something = ;
If you run your application without specifying an environment, or specifying
an environment other than "dev", the require
function will operate as usual,
triggering a MODULE_NOT_FOUND
error if something
isn't installed. However,
if you run in "dev" mode, it will install something
for you.
NODE_ENV=dev node app
API
.setLogger(logger)
You can make requiry use a custom logger by passing it in.
.enable(boolean)
If you would like to disable Requiry, even in "dev" mode, you can call
requiry.enable(false)
.