{
  "name": "rc",
  "version": "0.4.0",
  "description": "hardwired configuration loader",
  "main": "index.js",
  "browserify": "browser.js",
  "scripts": {
    "test": "set -e; node test/test.js; node test/ini.js"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/dominictarr/rc.git"
  },
  "keywords": [
    "config",
    "rc",
    "unix",
    "defaults"
  ],
  "bin": {
    "rc": "./index.js"
  },
  "author": {
    "name": "Dominic Tarr",
    "email": "dominic.tarr@gmail.com",
    "url": "dominictarr.com"
  },
  "licenses": [
    "BSD",
    "MIT",
    "Apache2"
  ],
  "dependencies": {
    "minimist": "~0.0.7",
    "deep-extend": "~0.2.5",
    "strip-json-comments": "0.1.x",
    "ini": "~1.1.0"
  },
  "readme": "# rc\n\nThe non-configurable configuration loader for lazy people.\n\n## Usage\n\nThe only option is to pass rc the name of your app, and your default configuration.\n\n```javascript\nvar conf = require('rc')(appname, {\n  //defaults go here.\n  port: 2468,\n\n  //defaults which are objects will be merged, not replaced\n  views: {\n    engine: 'jade'\n  }\n});\n```\n\n`rc` will return your configuration options merged with the defaults you specify.\nIf you pass in a predefined defaults object, it will be mutated:\n\n```javascript\nvar conf = {};\nrequire('rc')(appname, conf);\n```\n\n\n## Standards\n\nGiven your application name (`appname`), rc will look in all the obvious places for configuration.\n\n  * command line arguments (parsed by minimist)\n  * environment variables prefixed with `${appname}_`\n  * if you passed an option `--config file` then from that file\n  * a local `.${appname}rc` or the first found looking in `./ ../ ../../ ../../../` etc.\n  * `$HOME/.${appname}rc`\n  * `$HOME/.${appname}/config`\n  * `$HOME/.config/${appname}`\n  * `$HOME/.config/${appname}/config`\n  * `/etc/${appname}rc`\n  * `/etc/${appname}/config`\n  * the defaults object you passed in.\n\nAll configuration sources that were found will be flattened into one object,\nso that sources **earlier** in this list override later ones.\n\n\n## Configuration File Formats\n\nConfiguration files (e.g. `.appnamerc`) may be in either [json](http://json.org/example) or [ini](http://en.wikipedia.org/wiki/INI_file) format. The example configurations below are equivalent:\n\n\n#### Formatted as `ini`\n\n```\n; You can include comments in `ini` format if you want.\n\ndependsOn=0.10.0\n\n\n; `rc` has built-in support for ini sections, see?\n\n[commands]\n  www     = ./commands/www\n  console = ./commands/repl\n\n\n; You can even do nested sections\n\n[generators.options]\n  engine  = ejs\n\n[generators.modules]\n  new     = generate-new\n  engine  = generate-backend\n\n```\n\n#### Formatted as `json`\n\n```json\n{\n  // You can even comment your JSON, if you want\n  \"dependsOn\": \"0.10.0\",\n  \"commands\": {\n    \"www\": \"./commands/www\",\n    \"console\": \"./commands/repl\"\n  },\n  \"generators\": {\n    \"options\": {\n      \"engine\": \"ejs\"\n    },\n    \"modules\": {\n      \"new\": \"generate-new\",\n      \"backend\": \"generate-backend\"\n    }\n  }\n}\n```\n\nComments are stripped from JSON config via [strip-json-comments](https://github.com/sindresorhus/strip-json-comments).\n\n> Since ini, and env variables do not have a standard for types, your application needs be prepared for strings.\n\n\n\n## Advanced Usage\n\n#### Pass in your own `argv`\n\nYou may pass in your own `argv` as the third argument to `rc`.  This is in case you want to [use your own command-line opts parser](https://github.com/dominictarr/rc/pull/12).\n\n```javascript\nrequire('rc')(appname, defaults, customArgvParser);\n```\n\n\n## Note on Performance\n\n`rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler) \n\n\n## License\n\nBSD / MIT / Apache2\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/dominictarr/rc/issues"
  },
  "homepage": "https://github.com/dominictarr/rc",
  "_id": "rc@0.4.0",
  "_shasum": "ce24a2029ad94c3a40d09604a87227027d7210d3",
  "_from": "rc@^0.4.0",
  "_resolved": "https://registry.npmjs.org/rc/-/rc-0.4.0.tgz"
}
