4.0.0 • Published 4 years ago

fileconfig v4.0.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
4 years ago

Quality Gate Status

fileconfig (v-4.0.0)

Library for configuration file loading

install it

npm install fileconfig -g

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 FileConfig = require("fileconfig");
var config = new FileConfig("/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 lint                # generate lint report

licence

Apache-2.0

4.0.0

4 years ago

3.2.0

8 years ago

3.1.0

8 years ago

3.0.0

8 years ago

2.0.0

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago