New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dotenv-safe-select

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-safe-select

> Allows to select dotenv files and run project with checks against predefined set of env variables during development.

latest
npmnpm
Version
2.0.0
Version published
Weekly downloads
169
2012.5%
Maintainers
1
Weekly downloads
 
Created
Source

Select dotenv file safe

Allows to select dotenv files and run project with checks against predefined set of env variables during development.

During development select any of .env files located into project root and do check current env variables against .env.example file with dotenv-safe.

Installation

yarn add dotenv-safe
yarn add --dev dotenv-safe-select

Usage

  • There only one file .env.example which needs to be checked in with version control and used as a single source of truth to check for present env variables.

  • Create other dotenv files like .env.local, .env.staging, .env.production etc. which are not checked in version control.

  • Issue development command for example yarn dotenv-safe-select -- next dev.

  • Optionally it is possible to pass direct path to dotenv file like so yarn dotenv-safe-select --path .env.mine -- next dev.

  • Select dotenv file you would like run your development against.

  • Profit :palm_tree:

Inspired by donenv-flow.

Note: the command passed to dotenv-safe-select executed as a child process spawn. I'm thinking to add child process fork support to be able execute .js files.

FAQs

Package last updated on 23 Mar 2020

Did you know?

Socket

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