This module is a utility for system administrators which is intended to be installed globally and used at command line.
It adds all dependencies, including child dependencies, contained in an npm-shrinkwrap.json file to the npm cache.
Read the documentation for npm-shrinkwrap for specifics about generating this file.
Install the module with:
npm install -g cache-shrinkwrap
cache-shrinkwrap command can be executed with either one or no arguments:
# With no argument, it looks in the current or parent directory for npm-shrinkwrap.jsoncache-shrinkwrap# You can also specify the path to a file created by npm shrinkwrap commandcache-shrinkwrap wraps/npm-shrinkwrap-2014-01-12.json
The result of inputting this npm-shrinkwrap.json file:
Is equivalent to executing these commands:
npm cache add firstname.lastname@example.org cache add email@example.com...
Although, it is not exactly equivalent. Node is only fired up once and all dependencies are added to the cache
through npm's api in a single session as follows:
npm.commands.cache(['add', 'firstname.lastname@example.org']). In other words,
it is much faster than trying to execute multiple
npm cache add name@version statements.
Although only intended for command line usage, there is a public api.
var cache_shrinkwrap = ;cache_shrinkwrap;
Copyright (c) 2014 SLCHackers Licensed under the MIT license.