0.1.0 • Published 8 years ago
@unifyme/config v0.1.0
config
Unify config from package.json, .env file, environment variables and argv
Install
npm install configUsage
config()Automatically it'll pick your config from the config hash on your
package.json file, your project .env file, your environment variables and
your CLI arguments. Your config will be available at process.env as string
environment variables, if you want them parsed instead you can get the returned
value of the config() call:
const args = config()APi
config(argv, options)
- argv: array where to fetch the CLI arguments. If not defined, it will fetch
them from
process.argv.slice(2) - options: options passed to
dotenv