0.1.0 • Published 6 years ago

@unifyme/config v0.1.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
6 years ago

Build Status Coverage Status

config

Unify config from package.json, .env file, environment variables and argv

Install

npm install config

Usage

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