bower-store
Use bower.json as a config store.
Install
Install with npm:
$ npm install bower-store --save
Inherits cache-base, please see the cache-base
documentation for more details.
Usage
Pass the cwd
and options to use, or an options object with cwd
or path
. If nothing is passed, the current working directory will be used.
var bower = cwd options;// orvar bower = options;// orvar bower = ;
Example
var bower = process;
API
Inherits cache-base, please see the cache-base
documentation for more details.
.set
bower;
Set property key
with the given value
.
Example
bower; console;//=> {"name": "my-project"} console;//=> "my-project"
.save
Persist bower.json to the file system at bower.path
.
bower;bower;
.get
bower;
Get property key
from bower.json.
Example
// given {"name": "my-project"}bower; console;//=> {"foo": "bar"}
.has
bower;
Returns true
if bower.json
has property key
.
Example
// given: {"name": "my-project"}console;//=> trueconsole;//=> false
.union
bower;
Create array key
, or concatenate values to array key
. Also uniquifies the array.
Example
bower;bower; console;//=> ['foo', 'bar', 'baz']console;//=> {keywords: ['foo', 'bar', 'baz']}
.rm
Delete the bower.json
file at bower.path
.
Example
bower;
Related projects
You might also be interested in these projects:
- data-store: Easily get, set and persist config data. | homepage
- expand-pkg: Parse string values in package.json into objects. | homepage
- find-pkg: Find the first directory with a package.json, recursing up, starting with the given directory. Similar… more | homepage
- normalize-pkg: Normalize values in package.json using the map-schema library. | homepage
- pkg-store: Use package.json as a config store. | homepage
- sync-pkg: CLI to sync only basic properties from package.json to bower.json. | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
Follow me on GitHub or Twitter for updates about bower-store and my other libraries:
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v, on April 07, 2016.