lazy-install
Install lazy dependencies when your node.js app starts
Install from npm
$ npm install --save lazy-install
Define lazy dependencies
Important about version numbers: the current version of lazy-install only supports absolute version numbers
// package.json "name": "myProject" "lazyDependencies": "server": "express": "4.0.0" "test": "mocha": "1.18.2"
Include in your project
var lazy = ;
Basic usage
Install all lazy dependencies in package.json
{ if err throw err; console;}lazy;
Using groups
Install app dependencies, and optionally test dependencies
var groups = 'server';if processenvENV !== 'production' groups;lazy;
Fine-grained control
Make runtime decisions on what to install
lazy;
Use alternate dependencies
Load another json file and install modules relative to its parent folder. Could be useful for when including components as git submodules.
lazy;
Changelog
- 0.3.0 Stores cached module in a shared folder, in
$HOME/.lazy-install-cache
, for even faster installs when using lazy-install in multiple projects - 0.2.3 Fixed issue with the cache path
- 0.2.2 Fixed critical bug in
lib/copy
- 0.2.1 Improved result logging, separating
result.count
andresult.cached
- 0.2.0 Cache modules in
/cache
for blazing fast re-installs - 0.1.0 Initial release
Made by Adam Renklint, Berlin 2014. MIT licensed.