{"_id":"base-resolver","_rev":"230704","name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","dist-tags":{"latest":"0.3.4"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T15:45:54.000Z","created":"2015-11-19T20:31:56.131Z","0.3.4":"2015-12-14T09:08:11.691Z","0.3.3":"2015-12-14T09:02:37.880Z","0.3.2":"2015-12-05T13:27:48.037Z","0.3.1":"2015-12-05T13:25:46.395Z","0.3.0":"2015-12-05T12:56:36.052Z","0.2.1":"2015-12-04T03:45:02.857Z","0.2.0":"2015-12-03T18:22:58.402Z","0.1.2":"2015-11-19T21:34:56.231Z","0.1.1":"2015-11-19T20:40:19.208Z","0.1.0":"2015-11-19T20:31:56.131Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"versions":{"0.3.4":{"name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","version":"0.3.4","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","lazy-cache":"^1.0.2","resolve-modules":"^0.3.3"},"devDependencies":{"base-methods":"^0.6.1","global-modules":"^0.2.0","mocha":"*"},"keywords":["base","resolver"],"verb":{"related":{"list":["global-modules","matched","npm-paths","resolve-modules"]},"reflinks":["generate","matched"],"plugins":["gulp-format-md"]},"gitHead":"ea138fefc9dcc9015d978c3621be756ab26f8e54","_id":"base-resolver@0.3.4","_shasum":"0a9d02c76f9efda477dc4d07c6a7701d722f62d0","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"0a9d02c76f9efda477dc4d07c6a7701d722f62d0","size":3383,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.3.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.3.4.tgz"},"directories":{},"publish_time":1450084091691,"_cnpm_publish_time":1450084091691,"_hasShrinkwrap":false},"0.3.3":{"name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","version":"0.3.3","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","lazy-cache":"^0.2.4","resolve-modules":"^0.3.1"},"devDependencies":{"base-methods":"^0.6.1","global-modules":"^0.2.0","mocha":"*"},"keywords":["base","resolver"],"verb":{"related":{"list":["global-modules","matched","npm-paths","resolve-modules"]},"reflinks":["generate","matched"],"plugins":["gulp-format-md"]},"gitHead":"c47eaf9434f501168dc3a9929ab8a8158c90731a","_id":"base-resolver@0.3.3","_shasum":"6db2afa35154d3037801e84396032af8820344cd","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6db2afa35154d3037801e84396032af8820344cd","size":3385,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.3.3.tgz"},"directories":{},"publish_time":1450083757880,"_cnpm_publish_time":1450083757880,"_hasShrinkwrap":false},"0.3.2":{"name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","version":"0.3.2","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","lazy-cache":"^0.2.4","resolve-modules":"^0.3.1"},"devDependencies":{"base-methods":"^0.6.1","global-modules":"^0.2.0","mocha":"*"},"keywords":["base","resolver"],"verb":{"related":{"list":["matched","resolve-modules","global-modules","npm-paths"]}},"gitHead":"a60c2575ee1eeb93dce14c9004ba0a918aea5d87","_id":"base-resolver@0.3.2","_shasum":"7256ab7a8cfb933b440a4de2b074597cef85c569","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"7256ab7a8cfb933b440a4de2b074597cef85c569","size":3546,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.3.2.tgz"},"directories":{},"publish_time":1449322068037,"_cnpm_publish_time":1449322068037,"_hasShrinkwrap":false},"0.3.1":{"name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","version":"0.3.1","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","lazy-cache":"^0.2.4","resolve-modules":"^0.3.1"},"devDependencies":{"base-methods":"^0.6.1","global-modules":"^0.2.0","mocha":"*"},"keywords":["base","resolver"],"verb":{"related":{"list":["matched","resolve-modules","global-modules","npm-paths"]}},"gitHead":"ebc2d882163438a93f116d1f72ea7038d01445be","_id":"base-resolver@0.3.1","_shasum":"2a864e9ea664615a72c2501acb38341e45f6d89f","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"2a864e9ea664615a72c2501acb38341e45f6d89f","size":3558,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.3.1.tgz"},"directories":{},"publish_time":1449321946395,"_cnpm_publish_time":1449321946395,"_hasShrinkwrap":false},"0.3.0":{"name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","version":"0.3.0","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","lazy-cache":"^0.2.4","resolve-modules":"^0.3.0"},"devDependencies":{"base-methods":"^0.6.1","global-modules":"^0.2.0","mocha":"*"},"keywords":["base","resolver"],"verb":{"related":{"list":["matched","resolve-modules","global-modules","npm-paths"]}},"gitHead":"dc37375badc2b62ead979ad1dcbe9b1fe2f82af1","_id":"base-resolver@0.3.0","_shasum":"4f4782005cfe8097a45cc26e84eca63d0d510ae1","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"4f4782005cfe8097a45cc26e84eca63d0d510ae1","size":3545,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.3.0.tgz"},"directories":{},"publish_time":1449320196052,"_cnpm_publish_time":1449320196052,"_hasShrinkwrap":false},"0.2.1":{"name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","lazy-cache":"^0.2.4","resolve-modules":"^0.2.1"},"devDependencies":{"base-methods":"^0.6.1","global-modules":"^0.2.0","mocha":"*"},"keywords":["base","resolver"],"verb":{"related":{"list":["matched","resolve-modules","global-modules","npm-paths"]}},"gitHead":"db8ff87c54e49aa1b4ae30e133d2c223598e443b","_id":"base-resolver@0.2.1","_shasum":"8867b18ab2ab443318ddd2e875cd3b37eb7d617f","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"8867b18ab2ab443318ddd2e875cd3b37eb7d617f","size":4097,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.2.1.tgz"},"directories":{},"publish_time":1449200702857,"_cnpm_publish_time":1449200702857,"_hasShrinkwrap":false},"0.2.0":{"name":"base-resolver","description":"'base-methods' plugin for resolving and loading globally installed npm modules.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"extend-shallow":"^2.0.1","lazy-cache":"^0.2.4","resolve-modules":"^0.2.1"},"devDependencies":{"base-methods":"^0.6.1","global-modules":"^0.2.0","mocha":"*"},"keywords":["base","resolver"],"verb":{"related":{"list":["matched","resolve-modules","global-modules","npm-paths"]}},"gitHead":"667bb4f2165f63be9afc081af71cc67f56e54895","_id":"base-resolver@0.2.0","_shasum":"ce74a506b61b8ac89195dc73683dfc81e2619427","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ce74a506b61b8ac89195dc73683dfc81e2619427","size":4011,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.2.0.tgz"},"directories":{},"publish_time":1449166978402,"_cnpm_publish_time":1449166978402,"_hasShrinkwrap":false},"0.1.2":{"name":"base-resolver","description":"base-methods plugin for resolving and registering 'base' applications.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"array-unique":"^0.2.1","extend-shallow":"^2.0.1","get-value":"^2.0.0","has-glob":"^0.1.1","inflection":"^1.7.2","isobject":"^2.0.0","lazy-cache":"^0.2.4","matched":"^0.3.2","resolve-dir":"^0.1.0","resolve-up":"^0.5.0"},"devDependencies":{"base-methods":"^0.5.0","base-tasks":"^0.1.1","mocha":"*"},"verb":{"related":{"list":["base-methods","base-paths","base-plugins","base-cli"]}},"gitHead":"d0d7e5d95be68db8d7c3849ce25fa6181dfd41a9","_id":"base-resolver@0.1.2","_shasum":"65b0fb6147467c442a99747202b5cd1cf7c12d6a","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"65b0fb6147467c442a99747202b5cd1cf7c12d6a","size":3879,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.1.2.tgz"},"directories":{},"publish_time":1447968896231,"_cnpm_publish_time":1447968896231,"_hasShrinkwrap":false},"0.1.1":{"name":"base-resolver","description":"base-methods plugin for resolving and registering 'base' applications.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"array-unique":"^0.2.1","extend-shallow":"^2.0.1","get-value":"^2.0.0","has-glob":"^0.1.1","inflection":"^1.7.2","isobject":"^2.0.0","lazy-cache":"^0.2.4","matched":"^0.3.2","resolve-dir":"^0.1.0","resolve-up":"^0.5.0"},"devDependencies":{"base-methods":"^0.5.0","base-tasks":"^0.1.1","mocha":"*"},"verb":{"related":{"list":["base-methods","base-paths","base-plugins","base-cli"]}},"gitHead":"d0d7e5d95be68db8d7c3849ce25fa6181dfd41a9","_id":"base-resolver@0.1.1","_shasum":"ef980d445cef2a5606f1803fad2649fd44180f8a","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ef980d445cef2a5606f1803fad2649fd44180f8a","size":3872,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.1.1.tgz"},"directories":{},"publish_time":1447965619208,"_cnpm_publish_time":1447965619208,"_hasShrinkwrap":false},"0.1.0":{"name":"base-resolver","description":"base-methods plugin for resolving and registering 'base' applications.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/base-resolver","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/base-resolver.git"},"bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"array-unique":"^0.2.1","extend-shallow":"^2.0.1","get-value":"^2.0.0","has-glob":"^0.1.1","inflection":"^1.7.2","isobject":"^2.0.0","lazy-cache":"^0.2.4","matched":"^0.3.2","resolve-dir":"^0.1.0","resolve-up":"^0.5.0"},"devDependencies":{"base-methods":"^0.5.0","base-tasks":"^0.1.1","mocha":"*"},"verb":{"related":{"list":["base-methods","base-paths","base-plugins","base-cli"]}},"gitHead":"a3e6f3de59d9e4ee8f3b64687cdce71da0fddadd","_id":"base-resolver@0.1.0","_shasum":"060663f06557d126ab41b5f2de272aca924d01ef","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"060663f06557d126ab41b5f2de272aca924d01ef","size":3172,"noattachment":false,"key":"/base-resolver/-/base-resolver-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/base-resolver/download/base-resolver-0.1.0.tgz"},"directories":{},"publish_time":1447965116131,"_cnpm_publish_time":1447965116131,"_hasShrinkwrap":false}},"readme":"# base-resolver [![NPM version](https://img.shields.io/npm/v/base-resolver.svg)](https://www.npmjs.com/package/base-resolver) [![Build Status](https://img.shields.io/travis/jonschlinkert/base-resolver.svg)](https://travis-ci.org/jonschlinkert/base-resolver)\n\n> 'base-methods' plugin for resolving and loading globally installed npm modules.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i base-resolver --save\n```\n\n## Usage\n\n```js\nvar resolver = require('base-resolver');\n```\n\n### Example\n\nIn two steps, the following example shows how we would use `base-resolver` with a custom `Generate` application that is built on top of [base-methods][].\n\n**Step 1: Setup**\n\nThe following example shows how we might begin creating a basic project generator from [base-methods][]. More specifically, this shows how we might register and cache generators.\n\n```js\nvar resolver = require('base-resolver');\nvar Generate = require('base-methods');\n\n// register a \"global\" plugin, to initialize the `generators` \n// object, and decorate a `register` method (as an alternative \n// to inheriting base-methods or other more complicated approaches)\nGenerate.use(function(app) {\n  app.generators = {};\n  app.define('register', function(key, config) {\n    this.generators[key] = config;\n    return this;\n  });\n});\n\n// register `resolver` as a global plugin\nGenerate.use(resolver('generate'));\n```\n\n**Step 2**\n\nIntantiate the custom application we just created, and search for generators!\n\n```js\nvar generate = new Generate();\n\n// setup a listener that will register generators (\n// `config`s) as they're emitted\ngenerate.on('config', function(config) {\n  console.log('registered:', config.alias);\n  generate.register(config.alias, config);\n});\n\n// find configs!\ngenerate\n  .resolve('generate-*/generator.js', {\n    cwd: require('global-modules')\n  });\n  .resolve('generate-*/generator.js', {\n    cwd: process.cwd()\n  });\n```\n\n## API\n\n**Params**\n\n* `name` **{String}**: Optionally specify a namespace for storing resolved configs.\n* `options` **{Object}**: Options to pass to [matched](https://github.com/jonschlinkert/matched)\n* `option.patterns` **{String|Array}**: Glob patterns to search\n* `option.cwd` **{String}**: The starting directory to search from\n* `returns` **{Object}**\n\n**Example**\n\n```js\nresolver.on('config', function(config) {\n  // do stuff with \"config\"\n});\n\nresolver\n  .resolve('foo', {pattern: 'generator.js', cwd: 'foo'})\n  .resolve('bar', {pattern: 'generator.js', cwd: 'bar'})\n  .resolve('baz', {pattern: 'generator.js', cwd: 'baz'})\n```\n\n## Related projects\n\n* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules)\n* [matched](https://www.npmjs.com/package/matched): Adds array support to node-glob, sync and async. Also supports tilde expansion (user home) and… [more](https://www.npmjs.com/package/matched) | [homepage](https://github.com/jonschlinkert/matched)\n* [npm-paths](https://www.npmjs.com/package/npm-paths): Returns an array of unique \"npm\" directories based on the user's platform and environment. | [homepage](https://github.com/jonschlinkert/npm-paths)\n* [resolve-modules](https://www.npmjs.com/package/resolve-modules): Resolves local and global npm modules that match specified patterns, and returns a configuration object… [more](https://www.npmjs.com/package/resolve-modules) | [homepage](https://github.com/jonschlinkert/resolve-modules)\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/base-resolver/issues/new).\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb) on December 14, 2015._","_attachments":{},"homepage":"https://github.com/jonschlinkert/base-resolver","bugs":{"url":"https://github.com/jonschlinkert/base-resolver/issues"},"license":"MIT"}