UNPKG

bricks-cli

Version:

Command line tool for developing ambitious ember.js apps

59 lines (58 loc) 2.66 kB
{ "name": "configstore", "version": "0.2.3", "description": "Easily load and save config without having to think about where and how", "keywords": [ "conf", "config", "configuration", "settings", "store", "editable", "yaml", "yml" ], "homepage": "https://github.com/yeoman/configstore", "bugs": { "url": "https://github.com/yeoman/configstore/issues" }, "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "http://sindresorhus.com" }, "main": "configstore.js", "repository": { "type": "git", "url": "git://github.com/yeoman/configstore.git" }, "scripts": { "test": "mocha" }, "engines": { "node": ">=0.10.0" }, "licenses": [ { "type": "BSD" } ], "dependencies": { "mkdirp": "~0.3.5", "js-yaml": "~3.0.1", "osenv": "0.0.3", "graceful-fs": "~2.0.1", "uuid": "~1.4.1", "object-assign": "~0.1.1" }, "devDependencies": { "mocha": "*" }, "files": [ "configstore.js" ], "readme": "# configstore [![Build Status](https://secure.travis-ci.org/yeoman/configstore.png?branch=master)](http://travis-ci.org/yeoman/configstore)\n\nEasily load and persist config without having to think about where and how.\n\nConfig is stored in a YAML file to make it simple for users to edit the config directly themselves. The file is located in `$XDG_CONFIG_HOME` or `~/.config`. Eg: `~/.config/configstore/id-of-your-choosing.yml`\n\n\n## Example usage\n\n```js\nvar Configstore = require('configstore');\nvar packageName = require('./package').name;\n\n// Init a Configstore instance with an unique ID eg. package name\n// and optionally some default values\nvar conf = new Configstore(packageName, { foo: 'bar' });\n\nconf.set('awesome', true);\nconsole.log(conf.get('awesome')); // true\nconsole.log(conf.get('foo')); // bar\n\nconf.del('awesome');\nconsole.log(conf.get('awesome')); // undefined\n```\n\n\n## Documentation\n\n### Methods\n\n#### .set(key, val)\n\nSet an item\n\n#### .get(key)\n\nGet an item\n\n#### .del(key)\n\nDelete an item\n\n### Properties\n\n#### .all\n\nGet all items as an object or replace the current config with an object:\n\n```js\nconf.all = {\n\thello: 'world'\n};\n```\n\n#### .size\n\nGet the item count\n\n#### .path\n\nGet the path to the config file. Can be used to show the user where the config file is located or even better open it for them.\n\n\n## License\n\n[BSD license](http://opensource.org/licenses/bsd-license.php) \nCopyright Google\n", "readmeFilename": "readme.md", "_id": "configstore@0.2.3", "_from": "configstore@^0.2.3" }