Socket
Socket
Sign inDemoInstall

env-cmd

Package Overview
Dependencies
6
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    env-cmd

Executes a command using the envs in the provided env file


Version published
Weekly downloads
934K
decreased by-1.52%
Maintainers
1
Install size
83.8 kB
Created
Weekly downloads
 

Changelog

Source

1.0.1

  • Fixed badges
  • Added .npmignore
  • Added help text to be printed out on certain errors
  • Handled uncaught errors nicely

Readme

Source

Travis Coveralls npm npm

env-cmd

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

Install

npm install env-cmd

Usage

Environment file ``./test/.env`

ENV1=THANKS
ENV2=FORALL
ENV4=THEFISH

This is the only accepted format for an environment file. If other formats are desired please create an issue

Package.json

{
  "scripts": {
    "test": "env-cmd -e ./test/.env mocha -R spec"
  }
}

or

Terminal

./node_modules/.bin/env-cmd -e ./test/.env node index.js

Why

Because sometimes it just too cumbersome passing tons of environment variables to scripts. Its usually just easier to have a file with all the vars in them, especially for development.

Do not commit sensitive data to a public git!

Special Thanks

Special thanks to cross-env for inspiration (use's the same cross-spawn lib underneath).

Keywords

FAQs

Last updated on 17 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc