0.1.5 • Published 3 years ago
env-profiles v0.1.5
env-profiles
Dead simple .env profile switching with yaml config
Sample env.yml configuration
default:
# comment...
default: true
dev:
default: false
dev: true
foo: barSwitch profiles
$ env-profiles default
Switched to the default profile
$ cat .env
default=trueWhen using custom profiles values are inherited from the default profile, then duplicates are overwritten by custom profile values
$ env-profiles dev
Switched to the dev profile
$ cat .env
default=false
dev=true
foo=barenv-profiles looks for the env.yml configuration file and writes the .env file in your current working directory of execution.
Don't forget to add env.yml to your .gitignore!
Install
The easiest way to use env-profiles is to install it globally as a Node command line program. Run the following command in Terminal:
$ npm install --global env-profilesOr, you can install env-profiles locally, for use in a single project:
$ npm install --save-dev env-profiles