{"_id":"common-config","_rev":"220887","name":"common-config","description":"Config store for values that are commonly needed by project scaffolders, like Generate or Yeoman.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T15:39:53.000Z","created":"2016-07-11T12:33:04.311Z","0.1.1":"2020-01-22T03:15:08.151Z","0.1.0":"2016-07-11T12:33:04.311Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/common-config.git"},"versions":{"0.1.1":{"name":"common-config","description":"Config store for values that are commonly needed by project scaffolders, like Generate or Yeoman.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/common-config","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/common-config.git"},"bugs":{"url":"https://github.com/jonschlinkert/common-config/issues"},"license":"MIT","main":"index.js","bin":{"common-config":"cli.js"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"composer":"^0.13.0","data-store":"^0.16.1","get-value":"^2.0.6","lazy-cache":"^2.0.1","log-utils":"^0.2.0","object.pick":"^1.1.2","omit-empty":"^0.4.1","question-cache":"^0.4.0","set-value":"^3.0.1","strip-color":"^0.1.0","tableize-object":"^0.1.0","text-table":"^0.2.0","yargs-parser":"^2.4.0"},"devDependencies":{"gulp-format-md":"^0.1.9","mocha":"^2.5.3"},"keywords":["cache","common","config","data","global","preferences","save","settings","store"],"verb":{"toc":true,"layout":"common-minimal","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["base-store","data-store"]},"reflinks":["verb","verb-readme-generator"],"lint":{"reflinks":true}},"gitHead":"a61748c87a83c3a08dffc4ccd441e4dbd5dbf262","_id":"common-config@0.1.1","_nodeVersion":"13.5.0","_npmVersion":"6.13.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"afcfeefe4f1ff74e452578100974a6578fe6bafb","size":4892,"noattachment":false,"key":"/common-config/-/common-config-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/common-config/download/common-config-0.1.1.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/common-config_0.1.1_1579662907997_0.11304218276836142"},"_hasShrinkwrap":false,"publish_time":1579662908151,"_cnpm_publish_time":1579662908151},"0.1.0":{"name":"common-config","description":"Config store for values that are commonly needed by project scaffolders, like Generate or Yeoman.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/common-config","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/common-config.git"},"bugs":{"url":"https://github.com/jonschlinkert/common-config/issues"},"license":"MIT","files":["cli.js","index.js","LICENSE","README.md","utils.js"],"main":"index.js","bin":{"common-config":"cli.js"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"composer":"^0.13.0","data-store":"^0.16.1","get-value":"^2.0.6","lazy-cache":"^2.0.1","log-utils":"^0.2.0","object.pick":"^1.1.2","omit-empty":"^0.4.1","question-cache":"^0.4.0","set-value":"^0.3.3","strip-color":"^0.1.0","tableize-object":"^0.1.0","text-table":"^0.2.0","yargs-parser":"^2.4.0"},"devDependencies":{"gulp-format-md":"^0.1.9","mocha":"^2.5.3"},"keywords":["cache","common","config","data","global","preferences","save","settings","store"],"verb":{"toc":true,"layout":"common-minimal","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["base-store","data-store"]},"reflinks":["verb","verb-readme-generator"],"lint":{"reflinks":true}},"gitHead":"b872303dfb19339b11ef1944af3a5b80517d8e9c","_id":"common-config@0.1.0","_shasum":"d1f1a741afa0cbf6a5ef09752bdfc2e677d8b4ef","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"d1f1a741afa0cbf6a5ef09752bdfc2e677d8b4ef","size":3518,"noattachment":false,"key":"/common-config/-/common-config-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/common-config/download/common-config-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/common-config-0.1.0.tgz_1468240382755_0.6292493622750044"},"directories":{},"publish_time":1468240384311,"_cnpm_publish_time":1468240384311,"_hasShrinkwrap":false}},"readme":"# common-config [![NPM version](https://img.shields.io/npm/v/common-config.svg?style=flat)](https://www.npmjs.com/package/common-config) [![NPM downloads](https://img.shields.io/npm/dm/common-config.svg?style=flat)](https://npmjs.org/package/common-config) [![Build Status](https://img.shields.io/travis/jonschlinkert/common-config.svg?style=flat)](https://travis-ci.org/jonschlinkert/common-config)\n\nConfig store for values that are commonly needed by project scaffolders, like Generate or Yeoman.\n\n## TOC\n\n- [CLI](#cli)\n  * [Installation](#installation)\n  * [Usage](#usage)\n  * [init](#init)\n- [API](#api)\n  * [Installation](#installation-1)\n  * [Usage](#usage-1)\n- [About](#about)\n  * [Related projects](#related-projects)\n  * [Contributing](#contributing)\n  * [Running tests](#running-tests)\n  * [Author](#author)\n  * [License](#license)\n\n_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_\n\nIt's common for build systems, project scaffolders and other applications to need certain basic information about the user. For example, `author.name` might be used for populating templates or commit messages, etc.\n\nThis library is an API and CLI for setting and getting these commonly needed values from a config store in the `~/.data-store/common-config` directory.\n\n## CLI\n\n### Installation\n\nInstall globally with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm install --global common-config\n```\n\n### Usage\n\n```sh\n$ common-config --help\n\n  Usage: common-config <command> [value]\n\n  Commands:\n    --init, -i  Initialize a prompt to store common values\n    --set,  -s  Save a value to the common-config store\n    --get,  -g  Show all values, or a specific value from the common-config store\n    --del,  -d  Delete a value from the common-config store\n    --help      Display this menu\n```\n\n### init\n\nInitialize a prompt session to populate the store with default values:\n\n```sh\n$ common-config --init\n```\n\n**Properties**\n\nAnswers are used to populate the following properties on the `config.data` object:\n\n* `author.name`\n* `author.username`\n* `author.twitter`\n* `author.url`\n* `license`\n\n**Questions**\n\nTo get the values, the following questions are asked:\n\n* `Full name?`: Your full name, saved to the `author.name` property.\n* `GitHub username?`: Your GitHub username, saved to the `author.username` property.\n* `Twitter username?`: Twitter username, saved to the `author.twitter` property.\n* `URL?`: URL, saved to the `author.url` property.\n* `Preferred license?`: Preferred license to use when initializing new projects. Saved to the `license` property.\n\n## API\n\n### Installation\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save common-config\n```\n\n### Usage\n\nAdd to your application using node.js `require()` system:\n\n```js\nvar config = require('common-config');\n\nconfig.set('author.name', 'Jon Schlinkert');\nconfig.set('author.username', 'jonschlinkert');\n\nconsole.log(config.get('author.name'));\n//=> 'Jon Schlinkert'\n\nconsole.log(config.get('author.username'));\n//=> 'jonschlinkert'\n\nconsole.log(config.get('author'));\n//=> {name: 'Jon Schlinkert', username: 'jonschlinkert'}\n\nconsole.log(config.data);\n//=> {author: {name: 'Jon Schlinkert', username: 'jonschlinkert'}}\n```\n\nSee the [unit tests](test.js) for more examples.\n\n## About\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://github.com/node-base/base-store) | [homepage](https://github.com/node-base/base-store \"Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object that exposes all of the methods from the data-store library. Also now supports sub-stores!\")\n* [data-store](https://www.npmjs.com/package/data-store): Easily get, set and persist config data. | [homepage](https://github.com/jonschlinkert/data-store \"Easily get, set and persist config data.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\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 © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/common-config/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 11, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/common-config","bugs":{"url":"https://github.com/jonschlinkert/common-config/issues"},"license":"MIT"}