altenv
v1.1.0
Published
Alternate and manage environment variables for different environments.
Downloads
32
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 altenvUsage
init- Create thealtenv.jsconfig file. A.envfile is created in the project root if none exists.
$ altenv init- Edit
altenv.js
- Set your preferred default environment variable values in the
defaultEnvproperty. - Add new target function(s) or update existing function(s) under the
transformersobject. These are used
to transform env variables to the preferred values.
useany of the targets to set/change the values in your.envfile
$ altenv use <target>
# The selected transformer target will be included in the .env file, marked by the name `ALTENV_TARGET`