altenv
v1.1.0
Published
Alternate and manage environment variables for different environments.
Downloads
2
Readme
Intro
Change up your environment variables according to your preferred target runtime environment or otherwise.
Install
# with npm
npm install -g altenv
# or with yarn
yarn global add altenv
Usage
init
- Create thealtenv.js
config file. A.env
file is created in the project root if none exists.
$ altenv init
- Edit
altenv.js
- Set your preferred default environment variable values in the
defaultEnv
property. - Add new target function(s) or update existing function(s) under the
transformers
object. These are used
to transform env variables to the preferred values.
use
any of the targets to set/change the values in your.env
file
$ altenv use <target>
# The selected transformer target will be included in the .env file, marked by the name `ALTENV_TARGET`