{ "_id": "pkg-config", "_rev": "6-31db41d1cf32e4da3097194c14200051", "name": "pkg-config", "description": "parse the closest `package.json` and get package specific configurations", "dist-tags": { "latest": "1.1.1" }, "versions": { "0.0.0": { "version": "0.0.0", "name": "pkg-config", "description": "parse the closest `package.json` and get package specific configurations", "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", "url": "https://www.ahmadnassri.com/" }, "homepage": "https://github.com/ahmadnassri/pkg-config", "repository": { "type": "git", "url": "https://github.com/ahmadnassri/pkg-config" }, "license": "MIT", "keywords": [ "pkg-config" ], "engines": { "node": ">=0.10" }, "files": [ "index.js" ], "bugs": { "url": "https://github.com/ahmadnassri/pkg-config/issues" }, "scripts": { "pretest": "standard && echint", "test": "mocha", "posttest": "npm run coverage", "coverage": "istanbul cover --dir coverage _mocha -- -R dot", "codeclimate": "codeclimate < coverage/lcov.info" }, "echint": { "ignore": [ "coverage/**" ] }, "devDependencies": { "codeclimate-test-reporter": "0.0.4", "echint": "^1.1.2", "istanbul": "^0.3.14", "mocha": "^2.2.5", "should": "^6.0.3", "standard": "^3.11.1" }, "dependencies": { "debug": "^2.2.0", "find-root": "^0.1.1" }, "gitHead": "ace2c96d623df7c6688fdb9846b82bc1ca9d556e", "_id": "pkg-config@0.0.0", "_shasum": "dd688a6ee763831643b4fec1fca1c52447fab2ee", "_from": ".", "_npmVersion": "2.7.4", "_nodeVersion": "0.12.2", "_npmUser": { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" }, "maintainers": [ { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" } ], "dist": { "shasum": "dd688a6ee763831643b4fec1fca1c52447fab2ee", "tarball": "https://registry.npmjs.org/pkg-config/-/pkg-config-0.0.0.tgz" }, "directories": {} }, "1.0.0": { "version": "1.0.0", "name": "pkg-config", "description": "parse the closest `package.json` and get package specific configurations", "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", "url": "https://www.ahmadnassri.com/" }, "homepage": "https://github.com/ahmadnassri/pkg-config", "repository": { "type": "git", "url": "https://github.com/ahmadnassri/pkg-config" }, "license": "MIT", "keywords": [ "pkg-config" ], "engines": { "node": ">=0.10" }, "files": [ "index.js" ], "bugs": { "url": "https://github.com/ahmadnassri/pkg-config/issues" }, "scripts": { "pretest": "standard && echint", "test": "mocha", "posttest": "npm run coverage", "coverage": "istanbul cover --dir coverage _mocha -- -R dot", "codeclimate": "codeclimate < coverage/lcov.info" }, "echint": { "ignore": [ "coverage/**" ] }, "devDependencies": { "codeclimate-test-reporter": "0.0.4", "echint": "^1.1.2", "istanbul": "^0.3.14", "mocha": "^2.2.5", "should": "^6.0.3", "standard": "^3.11.1" }, "dependencies": { "debug": "^2.2.0", "find-root": "^0.1.1" }, "gitHead": "ace2c96d623df7c6688fdb9846b82bc1ca9d556e", "_id": "pkg-config@1.0.0", "_shasum": "69068f7143bd2fec542825d9009908d41eab46ad", "_from": ".", "_npmVersion": "2.7.4", "_nodeVersion": "0.12.2", "_npmUser": { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" }, "maintainers": [ { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" } ], "dist": { "shasum": "69068f7143bd2fec542825d9009908d41eab46ad", "tarball": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.0.0.tgz" }, "directories": {} }, "1.0.1": { "version": "1.0.1", "name": "pkg-config", "description": "parse the closest `package.json` and get package specific configurations", "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", "url": "https://www.ahmadnassri.com/" }, "homepage": "https://github.com/ahmadnassri/pkg-config", "repository": { "type": "git", "url": "ahmadnassri/pkg-config" }, "license": "MIT", "keywords": [ "pkg-config" ], "engines": { "node": ">=0.10" }, "files": [ "index.js" ], "bugs": { "url": "https://github.com/ahmadnassri/pkg-config/issues" }, "scripts": { "pretest": "standard && echint", "test": "mocha", "posttest": "npm run coverage", "coverage": "istanbul cover --dir coverage _mocha -- -R dot", "codeclimate": "codeclimate < coverage/lcov.info" }, "echint": { "ignore": [ "coverage/**" ] }, "devDependencies": { "codeclimate-test-reporter": "0.0.4", "echint": "^1.2.0", "istanbul": "^0.3.15", "mocha": "^2.2.5", "should": "^6.0.3", "standard": "^4.2.0" }, "dependencies": { "debug": "^2.2.0", "find-root": "^0.1.1", "xtend": "^4.0.0" }, "gitHead": "c0cdff77b39cc7c074f43808c7a239e080564f59", "_id": "pkg-config@1.0.1", "_shasum": "73b5ece55bf1bee0c126c40acc3658de656e9fa4", "_from": ".", "_npmVersion": "2.7.4", "_nodeVersion": "0.12.2", "_npmUser": { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" }, "maintainers": [ { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" } ], "dist": { "shasum": "73b5ece55bf1bee0c126c40acc3658de656e9fa4", "tarball": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.0.1.tgz" }, "directories": {} }, "1.1.0": { "version": "1.1.0", "name": "pkg-config", "description": "parse the closest `package.json` and get package specific configurations", "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", "url": "https://www.ahmadnassri.com/" }, "homepage": "https://github.com/ahmadnassri/pkg-config", "repository": { "type": "git", "url": "git+https://github.com/ahmadnassri/pkg-config.git" }, "license": "MIT", "keywords": [ "pkg-config" ], "engines": { "node": ">=0.10" }, "files": [ "index.js" ], "bugs": { "url": "https://github.com/ahmadnassri/pkg-config/issues" }, "scripts": { "pretest": "standard && echint", "test": "mocha", "posttest": "npm run coverage", "coverage": "istanbul cover --dir coverage _mocha -- -R dot", "codeclimate": "codeclimate < coverage/lcov.info" }, "echint": { "ignore": [ "coverage/**" ] }, "devDependencies": { "codeclimate-test-reporter": "0.1.0", "echint": "^1.3.0", "istanbul": "^0.3.17", "mocha": "^2.2.5", "should": "^7.0.1", "standard": "^4.5.2" }, "dependencies": { "debug-log": "^1.0.0", "find-root": "^0.1.1", "xtend": "^4.0.0" }, "gitHead": "e21c7f01463a0b0760675618d21e34f97c1b5e22", "_id": "pkg-config@1.1.0", "_shasum": "1f9684b12c0fd5bcef3b2bd75265433b97b74c5d", "_from": ".", "_npmVersion": "3.0.0", "_nodeVersion": "0.12.2", "_npmUser": { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" }, "maintainers": [ { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" } ], "dist": { "shasum": "1f9684b12c0fd5bcef3b2bd75265433b97b74c5d", "tarball": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.0.tgz" }, "directories": {} }, "1.1.1": { "version": "1.1.1", "name": "pkg-config", "description": "parse the closest `package.json` and get package specific configurations", "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", "url": "https://www.ahmadnassri.com/" }, "homepage": "https://github.com/ahmadnassri/pkg-config", "repository": { "type": "git", "url": "git+https://github.com/ahmadnassri/pkg-config.git" }, "license": "MIT", "keywords": [ "pkg-config" ], "engines": { "node": ">=0.10" }, "files": [ "index.js" ], "bugs": { "url": "https://github.com/ahmadnassri/pkg-config/issues" }, "scripts": { "pretest": "standard && echint", "test": "mocha", "posttest": "npm run coverage", "coverage": "istanbul cover --dir coverage _mocha -- -R dot", "codeclimate": "codeclimate < coverage/lcov.info" }, "echint": { "ignore": [ "coverage/**" ] }, "devDependencies": { "codeclimate-test-reporter": "0.3.1", "echint": "^1.5.3", "istanbul": "^0.4.2", "mocha": "^2.4.5", "should": "^8.2.2", "standard": "^6.0.8" }, "dependencies": { "debug-log": "^1.0.0", "find-root": "^1.0.0", "xtend": "^4.0.1" }, "gitHead": "520f922a2ea4731be77603c306c2d50568dca2d3", "_id": "pkg-config@1.1.1", "_shasum": "557ef22d73da3c8837107766c52eadabde298fe4", "_from": ".", "_npmVersion": "3.7.3", "_nodeVersion": "5.7.0", "_npmUser": { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" }, "maintainers": [ { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" } ], "dist": { "shasum": "557ef22d73da3c8837107766c52eadabde298fe4", "tarball": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz" }, "_npmOperationalInternal": { "host": "packages-13-west.internal.npmjs.com", "tmp": "tmp/pkg-config-1.1.1.tgz_1458708128079_0.771446582628414" }, "directories": {} } }, "readme": "# pkg-config [![version][npm-version]][npm-url] [![License][npm-license]][license-url]\n\n> parse the closest `package.json` and get package specific configurations\n\nUseful for package developers to store package-related configuration in dependent's `package.json`.\n\ndefaults to `config` as root, which allows you to still leverage npm's standard [config](https://docs.npmjs.com/files/package.json#config)\n\n[![Build Status][travis-image]][travis-url]\n[![Downloads][npm-downloads]][npm-url]\n[![Code Climate][codeclimate-quality]][codeclimate-url]\n[![Coverage Status][codeclimate-coverage]][codeclimate-url]\n[![Dependencies][david-image]][david-url]\n\n## Install\n\n```sh\nnpm install --save pkg-config\n```\n\n## Usage\n\n###### sample package.json\n```json\n{\n ...\n\n \"config\": {\n \"my-pkg\": {\n \"foo\": \"bar\"\n }\n },\n\n \"settings\": {\n \"some-pkg\": {\n \"foo\": \"bar\"\n }\n }\n\n ...\n}\n```\n\n```js\n// defaults to `package.config`\nvar config = require('pkg-config')()\n\n// returns `package.config[my-pkg]`\nvar config = require('pkg-config')('my-pkg')\n\n// returns fallback value\nvar config = require('pkg-config')('another-pkg', false, {\n foo: 'baz'\n})\n\n// returns `package.settings[some-pkg]`\nvar config = require('pkg-config')('some-pkg', {\n root: 'settings'\n})\n\n// returns `package.settings`\nvar config = require('pkg-config')('settings', {\n root: false\n})\n```\n\n## API\n\n### config(namespace[, options, fallback])\n\n#### Arguments\n\n| name | description | default |\n| ----------- | ------------------------------------------------------------------------- | ----------- |\n| `namespace` | property name in `package.json`, typically this will be your package name | `undefined` |\n| `option` | see [`options`](#options) |\n| `fallback` | fallback value | `undefined` |\n\n#### Options\n\n| name | description | default |\n| ------ | ---------------------------------------------- | ------------- |\n| `root` | `package.json` object root | `config` |\n| `cwd` | starting directory to look for `package.json` | `process.cwd` |\n| `cache` | cache `package.json`'s content | `true` | \n\n\n## Support\n\nDonations are welcome to help support the continuous development of this project.\n\n[![Gratipay][gratipay-image]][gratipay-url]\n[![PayPal][paypal-image]][paypal-url]\n[![Flattr][flattr-image]][flattr-url]\n[![Bitcoin][bitcoin-image]][bitcoin-url]\n\n## License\n\n[MIT](LICENSE) © [Ahmad Nassri](https://www.ahmadnassri.com)\n\n[license-url]: https://github.com/ahmadnassri/pkg-config/blob/master/LICENSE\n\n[travis-url]: https://travis-ci.org/ahmadnassri/pkg-config\n[travis-image]: https://img.shields.io/travis/ahmadnassri/pkg-config.svg?style=flat-square\n\n[npm-url]: https://www.npmjs.com/package/pkg-config\n[npm-license]: https://img.shields.io/npm/l/pkg-config.svg?style=flat-square\n[npm-version]: https://img.shields.io/npm/v/pkg-config.svg?style=flat-square\n[npm-downloads]: https://img.shields.io/npm/dm/pkg-config.svg?style=flat-square\n\n[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/pkg-config\n[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/pkg-config.svg?style=flat-square\n[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/pkg-config.svg?style=flat-square\n\n[david-url]: https://david-dm.org/ahmadnassri/pkg-config\n[david-image]: https://img.shields.io/david/ahmadnassri/pkg-config.svg?style=flat-square\n\n[gratipay-url]: https://www.gratipay.com/ahmadnassri/\n[gratipay-image]: https://img.shields.io/gratipay/ahmadnassri.svg?style=flat-square\n\n[paypal-url]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UJ2B2BTK9VLRS&on0=project&os0=pkg-config\n[paypal-image]: http://img.shields.io/badge/paypal-donate-green.svg?style=flat-square\n\n[flattr-url]: https://flattr.com/submit/auto?user_id=ahmadnassri&url=https://github.com/ahmadnassri/pkg-config&title=pkg-config&language=&tags=github&category=software\n[flattr-image]: http://img.shields.io/badge/flattr-donate-green.svg?style=flat-square\n\n[bitcoin-image]: http://img.shields.io/badge/bitcoin-1Nb46sZRVG3or7pNaDjthcGJpWhvoPpCxy-green.svg?style=flat-square\n[bitcoin-url]: https://www.coinbase.com/checkouts/ae383ae6bb931a2fa5ad11cec115191e?name=pkg-config\n", "maintainers": [ { "name": "ahmadnassri", "email": "ahmad@ahmadnassri.com" } ], "time": { "modified": "2016-10-26T16:51:28.996Z", "created": "2015-05-29T09:24:01.052Z", "0.0.0": "2015-05-29T09:24:01.052Z", "1.0.0": "2015-05-29T09:24:48.092Z", "1.0.1": "2015-06-12T02:59:26.951Z", "1.1.0": "2015-07-06T02:51:59.852Z", "1.1.1": "2016-03-23T04:42:10.628Z" }, "homepage": "https://github.com/ahmadnassri/pkg-config", "keywords": [ "pkg-config" ], "repository": { "type": "git", "url": "git+https://github.com/ahmadnassri/pkg-config.git" }, "author": { "name": "Ahmad Nassri", "email": "ahmad@ahmadnassri.com", "url": "https://www.ahmadnassri.com/" }, "bugs": { "url": "https://github.com/ahmadnassri/pkg-config/issues" }, "license": "MIT", "readmeFilename": "README.md", "users": { "mswanson1524": true }, "_attachments": {} }