npm-pkgr caches npm install results by hashing dependencies from package.json
and npm-shrinkwrap.json.
If your package.json did not change from last build, then you will immediately get
either:
- a symlink
node_modules.. - a full
node_modulescopy..
.. to the latest build result located in ~/.npm-pkgr
npm-pkgr frees your deployments from npm network issues and will make your
deploys run fast.
npm install -g npm-pkgrUse npm-pkgr instead of npm install and you are done.
npm-pkgrHashes and find the latest build corresponding to package.json and npm-shrinkwrap.json.
npm-pkgr --productionHashes and fin the latest build corresponding to npm-shrinkwrap.json.
Every flag passed to npm-pkgr is then passed down to npm command.
The cache folder used by npm-pkgr is ~/.npm-pkgr for current user.
We do not do any cleaning in it if it becomes too large, do it.
DEBUG=npm-pkgr* npm-pkgrWill give you some debug information.
Default strategy is to symlink $CWD/node_modules -> ~/.npm-pkgr/$hash/node_modules.
You can also get a full copy of the ~/.npm-pkgr/$hash/node_modules.
npm-pkgr --strategy=copyCarefull, if you --strategy copy, you will end up installing the copy package
- insanely fast
npm installif already done npm installonce in your CI server, deploy everywhere- solves shrinkwrap inconsistencies/problems
- solves devDependencies updates even when you use a shrinkwrap
- concurrent builds
- get symlinks or copy to cached
node_modules