Skip to content

tiny-conf plugin to load data from command-line arguments using `yargs-parser`

License

Notifications You must be signed in to change notification settings

tiny-conf/plugin-argv

Repository files navigation

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'

About

tiny-conf plugin to load data from command-line arguments using `yargs-parser`

Resources

License

Stars

Watchers

Forks

Packages

No packages published