{"_id":"squirrel","_rev":"336742","name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"time":{"modified":"2021-06-20T02:20:48.000Z","created":"2012-07-06T07:12:59.883Z","1.0.0":"2014-11-20T00:53:00.322Z","0.2.2":"2014-05-11T10:26:15.361Z","0.2.1":"2013-08-18T10:34:47.149Z","0.2.0":"2013-08-18T10:18:54.452Z","0.1.1":"2012-08-13T07:10:04.095Z","0.1.0":"2012-07-09T23:49:05.463Z","0.0.5":"2012-07-06T07:12:59.883Z"},"users":{},"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"versions":{"1.0.0":{"name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"keywords":["dependency","optional","npm"],"version":"1.0.0","dependencies":{"debug":"*","read":"^1","underscore":"^1","pull-stream":"^2"},"devDependencies":{"expect.js":"~0.3","mocha":"^2.0.1"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"scripts":{"test":"mocha --reporter spec --timeout 30s","gendocs":"gendocs > README.md"},"main":"index.js","directories":{"test":"test"},"license":"MIT","gitHead":"5729ad31764907d0d3404f341a09a177f7ab87d4","homepage":"https://github.com/DamonOehlman/squirrel","_id":"squirrel@1.0.0","_shasum":"bfe3aae1dcf41a42d0b83b323caa09bf723e2499","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"dist":{"shasum":"bfe3aae1dcf41a42d0b83b323caa09bf723e2499","size":5916,"noattachment":false,"key":"/squirrel/-/squirrel-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/squirrel/download/squirrel-1.0.0.tgz"},"publish_time":1416444780322,"_cnpm_publish_time":1416444780322,"_hasShrinkwrap":false},"0.2.2":{"name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"keywords":["dependency","optional","npm"],"version":"0.2.2","dependencies":{"debug":"*","read":"^1","underscore":"^1","pull-stream":"^2"},"devDependencies":{"expect.js":"~0.3","mocha":"^1"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"scripts":{"test":"mocha --reporter spec --timeout 30s","gendocs":"gendocs > README.md"},"main":"index.js","directories":{"test":"test"},"license":"MIT","homepage":"https://github.com/DamonOehlman/squirrel","_id":"squirrel@0.2.2","_shasum":"dad8e8e8cec97a4eb689e59962576ac55e472ce6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"dist":{"shasum":"dad8e8e8cec97a4eb689e59962576ac55e472ce6","size":5881,"noattachment":false,"key":"/squirrel/-/squirrel-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/squirrel/download/squirrel-0.2.2.tgz"},"publish_time":1399803975361,"_cnpm_publish_time":1399803975361,"_hasShrinkwrap":false},"0.2.1":{"name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"keywords":["dependency","optional","npm"],"version":"0.2.1","dependencies":{"debug":"*","read":"~1.0.5","underscore":"~1.5.1","pull-stream":"~2.20.1"},"devDependencies":{"expect.js":"0.1.x","mocha":"1.12.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"scripts":{"test":"$(npm bin)/mocha --reporter spec --timeout 30s","gendocs":"gendocs > README.md"},"main":"index.js","directories":{"test":"test"},"license":"MIT","readmeFilename":"README.md","_id":"squirrel@0.2.1","dist":{"shasum":"d5ec18b65a323042f97beec9a64893d773d6587f","size":5228,"noattachment":false,"key":"/squirrel/-/squirrel-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/squirrel/download/squirrel-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"publish_time":1376822087149,"_cnpm_publish_time":1376822087149,"_hasShrinkwrap":false},"0.2.0":{"name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"keywords":["dependency","optional","npm"],"version":"0.2.0","dependencies":{"debug":"*","read":"~1.0.5","underscore":"~1.5.1","pull-stream":"~2.20.1"},"devDependencies":{"expect.js":"0.1.x","mocha":"1.12.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"scripts":{"test":"$(npm bin)/mocha --reporter spec --timeout 30s","gendocs":"gendocs > README.md"},"main":"index.js","directories":{"test":"test"},"license":"MIT","readmeFilename":"README.md","_id":"squirrel@0.2.0","dist":{"shasum":"bd5b86b9d64c54db4e2078d61d8c31ae0229be33","size":4721,"noattachment":false,"key":"/squirrel/-/squirrel-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/squirrel/download/squirrel-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"publish_time":1376821134452,"_cnpm_publish_time":1376821134452,"_hasShrinkwrap":false},"0.1.1":{"name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"tags":["dependency","optional","npm"],"version":"0.1.1","engines":{"node":">= 0.6.x < 0.9.0"},"dependencies":{"async":"0.1.x","debug":"*","read":"0.1.x","underscore":"1.3.x"},"devDependencies":{"expect.js":"0.1.x","mocha":"1.2.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"scripts":{"test":"node_modules/mocha/bin/mocha --reporter spec --timeout 10000"},"contributors":[],"_id":"squirrel@0.1.1","dist":{"shasum":"2b0bf04eca9c3575ff32fd0f6fbeba5201b65e5a","size":3986,"noattachment":false,"key":"/squirrel/-/squirrel-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/squirrel/download/squirrel-0.1.1.tgz"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"directories":{},"publish_time":1344841804095,"_cnpm_publish_time":1344841804095,"_hasShrinkwrap":false},"0.1.0":{"name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"tags":["dependency","optional","npm"],"version":"0.1.0","engines":{"node":">= 0.6.x < 0.9.0"},"dependencies":{"async":"0.1.x","debug":"*","read":"0.1.x","underscore":"1.3.x"},"devDependencies":{"expect.js":"0.1.x","mocha":"1.2.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"scripts":{"test":"node_modules/mocha/bin/mocha --reporter spec --timeout 10000"},"contributors":[],"_id":"squirrel@0.1.0","dist":{"shasum":"a2f11f81baa4e64fb03698797f3e6b369a901fc5","size":3934,"noattachment":false,"key":"/squirrel/-/squirrel-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/squirrel/download/squirrel-0.1.0.tgz"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"directories":{},"publish_time":1341877745463,"_cnpm_publish_time":1341877745463,"_hasShrinkwrap":false},"0.0.5":{"name":"squirrel","description":"A furry little helper for dealing with optional NPM dependencies","author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"tags":["dependency","optional","npm"],"version":"0.0.5","engines":{"node":">= 0.6.x < 0.9.0"},"dependencies":{"async":"0.1.x","debug":"*","read":"0.1.x","underscore":"1.3.x"},"devDependencies":{"expect.js":"0.1.x","mocha":"1.2.x"},"repository":{"type":"git","url":"git://github.com/DamonOehlman/squirrel.git"},"bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"scripts":{"test":"node_modules/mocha/bin/mocha --reporter spec --timeout 10000"},"contributors":[],"_id":"squirrel@0.0.5","dist":{"shasum":"14ec2af9903b885decb4605729c4141d5c8b1525","size":3917,"noattachment":false,"key":"/squirrel/-/squirrel-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/squirrel/download/squirrel-0.0.5.tgz"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},{"name":"mattmcnam","email":"matt@mattmcn.com"}],"directories":{},"publish_time":1341558779883,"_cnpm_publish_time":1341558779883,"_hasShrinkwrap":false}},"readme":"# squirrel\n\nSquirrel is a helpful node module that assists you requiring your\ndependencies for plugins of your application (version controlled via a\ncustom `pluginDependencies` in your `package.json` file).\n\n\n[![NPM](https://nodei.co/npm/squirrel.png)](https://nodei.co/npm/squirrel/)\n\n[![Build Status](https://img.shields.io/travis/DamonOehlman/squirrel.svg?branch=master)](https://travis-ci.org/DamonOehlman/squirrel) [![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](https://github.com/dominictarr/stability#unstable) \n\n## Why Squirrel?\n\nBecause personally, I really don't like the sitting waiting for a node\npackage to install a whole swag of dependencies because it requires them\nfor some functionality that I don't intend to use.  I believe using\nsquirrel will enable certain types of packages to have a leaner core\nwith properly managed and installable optional dependencies.\n\n## Example Usage\n\nIf you are using `optionalDependencies` in your application, you might\nconsider using `pluginDependencies` instead and then \"squirreling\"\nthem rather than requiring them.\n\n__NOTE:__ Squirreling is an asynchronous operation:\n\n```js\nvar squirrel = require('squirrel');\n\nsquirrel('coffee-script', function(err, coffee) {\n  // do something magical with coffeescript...\n});\n```\n\nIf you need multiple modules, then squirrel is happy to play in a \nway similar to the way AMD module loaders do:\n\n```js\nsquirrel(['coffee-script', 'jade'], function(err, coffee, jade) {\n  // do something with both coffeescript and jade...\n});\n```\n\n## Different \"Allow Install\" Modes\n\nSquirrel has been built to support a number of \"Allow Install\" modes, which \nis controlled in an `allowInstall` option that the squirrel function accepts\nin the 2nd argument, e.g.:\n\n```js\n// install jade, and don't trigger a prompt if not already available\nsquirrel('jade', { allowInstall: true }, function(err, jade) {\n});\n```\nThe default setting for the `allowInstall` option is set to `prompt` which\nmeans that when a module using `squirrel` attempts to squirrel one or more\nmodules, the user will be prompted if they want to allow those modules to\ninstall.  If they don't permit installation then the squirrel operation\nwill fail and an error will be returned in the callback.\n\nOther valid settings for the `allowInstall` option are `true` (install\ndependencies without prompting) or `false` (always reject module requests).\n\n## Other Squirrel Options\n\nA squirrel's got to have options.  The demands on the modern squirrel\nmean that having options is important, and this squirrel is not different.\nHere are the options that squirrel supports in a 2nd (optional) argument.\n\n- `allowInstall` - as outlined above.\n- `promptMessage` - 'Package \"<%= target %>\" is required. Permit install? '\n- `cwd` - the path to squirrel in\n- `installer` - 'npm'\n- `installCommand` - '<%= opts.installer %> install <%= target %>@<%= version %>'\n- `uninstallCommand` - '<%= opts.installer %> rm <%= target %>'\n\nThe default options can be modified through modifying them in\nthe `squirrel.defaults` object.\n\n## Shouldn't Squirrel be dependency free?\n\nYou could argue that given squirrel's mission is to reduce the overall\nnumber of package dependencies, it should be ultralight in it's own\npackaging.  While that's a valid point, I think a balance is required and\nusing existing well-tested libraries is important.\n\n## Reference\n\n### squirrel(targets, opts?, callback)\n\nRequest the installation of the modules specified in the `targets` array\nargument.\n\n### squirrel.rm(targets, opts, callback)\n\nRemove the specified targets.  Used in squirrel tests and I guess in some\ncases might be useful in production code also.\n\n## Squirrel Installer Reference\n\nThis module constains the installer helper functions used within squirrel.\nEach of the functions outlined below is designed to be called initially\nwith an options object, which then provides you the function signature\noutlined in the docs.\n\n```js\nvar installer = require('squirrel/installer');\n```\n\n### install(target, callback)\n\nUse npm to install the required target.\n\n### prepare(target, callback)\n\nThis is the first step called in the pull-stream when squirrel is asked\nfor particular modules.  It will determine what action is required based\non what has been asked for, depending on a number of factors:\n\n- whether the module requested is relative (i.e. starts with a dot)\n- what our allowed install options (prompt, always, never, etc)\n- whether the module is already available or not\n\n### remove(target, callback)\n\nExecute the required installer operation\n\n## License(s)\n\n### MIT\n\nCopyright (c) 2014 Damon Oehlman <damon.oehlman@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/DamonOehlman/squirrel","bugs":{"url":"http://github.com/DamonOehlman/squirrel/issues"},"license":"MIT"}