1.0.0 • Published 8 years ago

labset-config-js v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
bitbucket
Last release
8 years ago

labset-config-js

install it

npm install labset-config-js

use it

assuming you have a configuration folder as follow:

+ /path/to/config/folder
+ share
default.yml -> symlink to dev/alpha.yml
+ qa
+ dev
alpha.yml

with this content

  • share/dev/alpha.yml
name: "alpha dev share"
port: 9090
dir: ${env.ALPHA_SHARE}

then you can fetch data as follow:

var Configuration  = require('labset-config-js');
var config         = new Configuration('/path/to/config/folder');

var defaultServer = config.share.default;
console.log(defaultServer.name);    // out : alpha dev share
console.log(defaultServer.port);    // out : 9090

dev

npm run test:watch          # run tests and watch for changes
npm run coverage            # generate coverage reports
npm run lint                # generate lint report

licence

Apache-2.0

1.0.0

8 years ago

0.0.1

8 years ago