1.1.0 • Published 7 years ago

tiny-conf-plugin-argv v1.1.0

Weekly downloads
8
License
MIT
Repository
github
Last release
7 years ago

tiny-conf-plugin-argv

Will store content of process.argv to the given tiny-conf store

Usage

const conf = require('tiny-conf');

require('tiny-conf-plugin-argv')(conf);

Example

Calling your app like this:

node /path/to/your/app.js --foo=bar --no-log --one.two tree

With /path/to/your/app.js:

const conf = require('tiny-conf');
require('tiny-conf-plugin-argv')(conf);

// it will load argv params in store:
conf.get('foo'); // 'bar'
conf.get('log'); // false
conf.get('one.two'); // 'three'