Skip to content

Commit

Permalink
Finish 0.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryDodzin committed Jun 29, 2017
2 parents 4221005 + acf62c5 commit 666d2f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -5,11 +5,11 @@ cache: node_modules

node_js:
- stable

install:

- npm install
after_success:
- npm run test
- npm run coveralls

deploy:
provider: npm
Expand Down
10 changes: 6 additions & 4 deletions README.md
Expand Up @@ -15,7 +15,7 @@ The ```GConf``` Object is the base and main API for the library.

The constructor for the class can register modifiers and providers (Note currenty there can be only one provider) from the options object.

###```options```
### ```options```

```javascript
{
Expand Down Expand Up @@ -50,7 +50,7 @@ example config for creating a [memory provider](#memory-provider) with an [env m

this gives me a object ``` { foo: 'bar' } ``` for requesting dev and ``` { foo: 'bar2000' } ``` for prod.

###``` GConf.get(domain, path) ```
### ``` GConf.get(domain, path) ```

this is the function to use to get the data from the config, meaning (with the example config above) you will get

Expand All @@ -68,7 +68,7 @@ this is the function to use to get the data from the config, meaning (with the e

This is a meta-options for gconf, for example the default domain when none is given

###``` gconf.registerProvider(provider, options) ``` & ``` gconf.registerModifier(modifier, options) ```
### ``` gconf.registerProvider(provider, options) ``` & ``` gconf.registerModifier(modifier, options) ```

Are a way to register modifiers and providers not in the constructor

Expand Down Expand Up @@ -127,12 +127,14 @@ Gconf can get the initial configuration for the singleton instance from a .gconf
{
"plugins": ["plugin-a", "plugin-b"],
"config": {
// ... gconf config
"gconf": "config"
}
}

```

With .gconfrc you can use ``` require('gconf/default'); // The same as require('gconf').instance.default ```

## Providers

### Memory Provider
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "gconf",
"version": "0.4.4",
"version": "0.4.5",
"description": "Global and dynamic config provider",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"immutable": "^3.8.1",
"lodash": "^4.17.2",
"yamljs": "^0.2.8",
"yamljs": "^0.3.0",
"yargs": "^8.0.0"
},
"maintainers": [
Expand Down

0 comments on commit 666d2f7

Please sign in to comment.