{"name":"helper-resolve","description":"Template helper to resolve the path to a file in node_modules. This is mostly useful during development.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/helper-resolve","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/helper-resolve"},"bugs":{"url":"https://github.com/jonschlinkert/helper-resolve/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"lodash":"^3.2.0","resolve":"^1.1.0"},"devDependencies":{"handlebars":"^3.0.0","jquery":"^2.1.3","mocha":"*","resolve":"^1.1.0","should":"*","template":"^0.9.3"},"keywords":[],"gitHead":"c89dca5e442a61263c61dcb43d687f1971714558","_id":"helper-resolve@0.1.2","_shasum":"f1dd91bd298204248914e22088f61099c278d1a6","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"f1dd91bd298204248914e22088f61099c278d1a6","tarball":"http://registry-npm.ywwl.com/helper-resolve/download/helper-resolve-0.1.2.tgz","integrity":"sha512-Cpev2e7uxBClta7tg7Y/1C5k+vbpVMKU9X8eyEHdF+9feJrMcPC3KrYPnEIFpnZaQuGkyej4xVXMQHfsxC00fw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmArjAfpCrkT/tMgLAcx3lTRSjMu9zgLlCXk1IMZfRlQIhAJqE6+27rT+xhvfE+pEkEOYYvqe87X1Rc3q2vwsZEVnz"}],"size":2034,"noattachment":false,"key":"/helper-resolve/-/helper-resolve-0.1.2.tgz"},"directories":{},"readme":"# helper-resolve [![NPM version](https://badge.fury.io/js/helper-resolve.svg)](http://badge.fury.io/js/helper-resolve)  [![Build Status](https://travis-ci.org/jonschlinkert/helper-resolve.svg)](https://travis-ci.org/jonschlinkert/helper-resolve) \n\n> Template helper to resolve the path to a file in node_modules. This is mostly useful during development.\n\nRefactored to return an object, so the results of the helper can be passed to other helpers that require more information.\n\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i helper-resolve --save\n```\n\n## Usage\n\n```js\nvar resolve = require('helper-resolve');\nvar Handlebars = require('handlebars');\n\nhandlebars.registerHelper('resolve', function (name, key) {\n  return resolve.sync(fp)[typeof key === 'string' ? key : 'main'];\n});\nhandlebars.compile('<script src=\\\"{{resolve \"jquery\" \"main\"}}\\\"></script>')().\n//=> '<script src=\"node_modules/jquery/dist/jquery.js\"></script>'\n\nhandlebars.compile('{{resolve \"jquery\" \"homepage\"}}')().\n//=> 'http://jquery.com'\n```\n\n## Assemble example\n\nRegister the helper with [assemble] v0.6.x to use with any template engine:\n\n```js\nvar assemble = require('assemble');\nassemble.helper('resolve', function (name, key) {\n  return resolve.sync(fp)[typeof key === 'string' ? key : 'main'];\n});\n```\n\n**async helper**\n\n```js\nassemble.asyncHelper('resolve', function (name, key, cb) {\n  if (typeof key === 'function') {\n    cb = key;\n    key = 'main';\n  }\n\n  resolve(name, function (err, res) {\n    cb(null, res[key]);\n  });\n});\n```\n\n## Run tests\nInstall dev dependencies:\n\n```bash\nnpm i -d && npm test\n```\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/helper-resolve/issues)\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\nCopyright (c) 2015 Jon Schlinkert  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 19, 2015._\n\n[assemble]: https://github.com/assemble/assemble\n","publish_time":1424721276579,"_cnpm_publish_time":1424721276579,"dist-tags":{"latest":"0.3.1"}}