1.0.5 • Published 6 years ago

env-manager-cli v1.0.5

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

env-manager-cli

Contactually's environmental variable management CLI. It updates your local .env as well as runs the commands for your staging and production values.

Build Status Coverage Status

Demo

Installation

yarn add --dev env-manager-cli

Implementation

envManager.js

import envManager from 'env-manager-cli'

envManager({
  stagingCommand: (key, value) => `heroku config:set ${key}=${value} test`,
  productionCommand: (key, value) => `heroku config:set ${key}=${value} prod`
})

package.json

  "scripts": {
    "env:set": "node ./envManager",
  },

now running yarn env:set will result in the following prompt

Configuration

  • envFilePath: String Optional this is the path to your local .env file. The default is "./.env"
  • stagingCommand: Function a function which accepts a key and value, and returns the staging update command. This will be logged and executed in the terminal
  • productionCommand: Function a function which accepts a key and value, and returns the production update command. This will be logged and executed in the terminal
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago