{"name":"config-file","version":"0.1.3","description":"Find and load a YAML or JSON config file from a local project, installed npm module, or the user's home directory.","repository":{"type":"git","url":"https://github.com/jonschlinkert/config-file.git"},"bugs":{"url":"https://github.com/jonschlinkert/config-file/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/config-file/blob/master/LICENSE-MIT"}],"main":"index.js","scripts":{"test":"mocha"},"engines":{"node":">= 0.8.0"},"dependencies":{"findup-sync":"~0.1.2","fs-utils":"~0.3.6","lodash":"~2.4.1"},"devDependencies":{"chai":"~1.9.0","mocha":"~1.17.1"},"keywords":["config","config file","configuration","runtime config"],"homepage":"https://github.com/jonschlinkert/config-file","_id":"config-file@0.1.3","dist":{"shasum":"a0faa8b1d41387dd06c0cca52e48b08e8d015029","tarball":"http://registry-npm.ywwl.com/config-file/download/config-file-0.1.3.tgz","integrity":"sha512-EEpKPkUqH1ENsbGfmMVNikVHuPy94miqN4ky72sg5oQOmunALLCT3pszzlpmntxkozvUOLgcAzP1bkZw8QWaEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxe26P+sJqgf9yxRLhqRg4ZK4GnWcown1Cn11qn/1xuAIhAO0sFXi0D7l5lfczCjRWY2cxJqO3MzvbHTl6Akix3Ojp"}],"size":3112,"noattachment":false,"key":"/config-file/-/config-file-0.1.3.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"readme":"# config-file [![NPM version](https://badge.fury.io/js/config-file.svg)](http://badge.fury.io/js/config-file)\n\n> Find and load a YAML or JSON config file (like .jshintrc, package.json, bower.json etc) from either a local project, installed npm module, or the user's home directory.\n\n## Heads up! Breaking changes\n\nv0.3.0 was a complete refactor. The readme [API](#API) section describes the new API.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i config-file --save\n```\n\n## Usage\n\n```js\nvar config = require('config-file');\n```\n\n## API\n\n### [config](index.js#L29)\n\nReturns an object from parsing JSON or YAML from the given config file. Uses `config.resovle` to resolve the filepath. If no filepath is specified, `config.resolve` falls back to 'package.json'\n\n**Params**\n\n* `filename` **{String}**: The name of the file to parse\n* `options` **{Object}**: Optionally specify `{parse:'json'}` or `{parse:'yaml'}`\n* `returns` **{Object}**\n\n**Example**\n\n```js\nvar opts = config('.jshintrc');\n```\n\n### [.npm](index.js#L53)\n\nParse a config file located in a locally installed npm package (in `node_modules`).\n\n**Params**\n\n* `moduleName` **{String}**: The name of the npm package to search in `node_modules`\n* `filename` **{String}**: Name of the file to find.\n* `options` **{Object}**\n\n**Example**\n\n```js\nvar data = config.npm('read-data', 'package.json');\n//=> { name: \"read-data\", ... }\n```\n\n### [.global](index.js#L78)\n\nParse a config file in a globally installed npm package.\n\n**Params**\n\n* `moduleName` **{String}**: The name of the global module to search\n* `filename` **{String}**: Name of the file to find.\n* `options` **{Object}**\n\n**Example**\n\n```js\nvar data = config.global('verb-cli', 'package.json');\n//=> { name: \"verb-cli\", ... }\n```\n\n### [.home](index.js#L100)\n\nReturn a filepath the user's home directory\n\n**Params**\n\n* `filepath` **{String}**: Filepath to find\n* `options` **{Object}**\n\n**Example**\n\n```js\nvar data = config.home('.jshintrc');\n```\n\n### [.resolve](index.js#L120)\n\nReturns the fully resolve path for the specified config file. Searches the local project first, then the user's home directory.\n\n**Params**\n\n* `filepath` **{String}**: Filepath to find\n* `options` **{Object}**\n* `returns` **{String}**: filepath to config file\n\n**Example**\n\n```js\nvar fp = config.resolve('.jshintrc');\n//=> '/Users/jonschlinkert/dev/config-file/package.json'\n```\n\n### [.parse](index.js#L142)\n\nParse a config file. Same as using `config()`.\n\n**Params**\n\n* `filename` **{String}**: Name of the file to parse.\n* `options` **{Object}**\n* `returns` **{Object}**\n\n**Example**\n\n```js\nvar data = config.parse('.jshintrc');\n```\n\n## Related projects\n\n* [global-modules](https://github.com/jonschlinkert/global-modules): The directory used by npm for globally installed npm modules.\n* [look-up](https://github.com/jonschlinkert/look-up): Like findup-sync and supports the same features but 20x-40x faster on avg.\n* [read-data](https://github.com/jonschlinkert/read-data): Read JSON or YAML files.\n* [read-yaml](https://github.com/jonschlinkert/read-yaml): Very thin wrapper around js-yaml for directly reading in YAML files.\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm i -g verb-cli && 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/config-file/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 © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 06, 2015._","publish_time":1392036810182,"_cnpm_publish_time":1392036810182,"dist-tags":{"latest":"0.3.2"}}