1.0.1 • Published 6 years ago

@eddiewen/dotenvjson v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

dotenvjson

npm version Dependency Status Standard Version CircleCI Coverage Status

This is a module to load .json file, like config.json, and export variables to process.env. Inspired by dotenv.

Installation

$ yarn add @eddiewen/dotenvjson

# npm install --save @eddiewen/dotenvjson

Usage

Create a .env.json file in the root folder of your project.

const dotenvjson = require('@eddiewen/dotenvjson');

dotenvjson();

And you get process.env now.

Options
  • path

Default value: path.join(process.cwd(), '.env.json')

You can use a custom config file path.

  • inUpperCase

Default value: true

You don't have to use upper case in config file. Parser transforms them to upper case if this is true. Or spelling names would be kept.

1.0.1

6 years ago

1.0.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago