0.0.2 • Published 10 months ago

env-cmd-es v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

env-cmd

A simple node program for executing commands using an environment from an env file.

💾 Install

npm install env-cmd or npm install -g env-cmd-es

⌨️ Basic Usage

.rc file ./.env-cmdrc.js

export default {
  "development": {
    "ENV1": "Thanks",
    "ENV2": "For All"
  },
  "test": {
    "ENV1": "No Thanks",
    "ENV3": "!"
  },
  "production": {
    "ENV1": "The Fish"
  }
}

or

export default async function () {
  return {
    "development": {
      "ENV1": "Thanks",
      "ENV2": "For All"
    },
    "test": {
      "ENV1": "No Thanks",
      "ENV3": "!"
    },
    "production": {
      "ENV1": "The Fish"
    }
  }
}

Terminal

env-cmd -e test node index.js

🚨 Notice

Environment variables only support string types. Using other types may result in errors.

0.0.2

10 months ago

0.0.1

10 months ago