Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-dotenv

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-dotenv - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

2

CHANGELOG.md

@@ -8,3 +8,3 @@ # Changelog

## 2.0.6 (2022-08-29)
## 2.0.7 (2022-08-29)

@@ -11,0 +11,0 @@ ### Added

{
"name": "create-dotenv",
"version": "2.0.6",
"version": "2.0.7",
"description": "Loads environment variables from .env file",

@@ -40,4 +40,5 @@ "publishConfig": {

"dependencies": {
"@jsdotenv/core": "^2.0.6",
"minimist": "^1.2.6"
"@jsdotenv/core": "^2.0.7",
"minimist": "^1.2.6",
"cross-spawn": "^7.0.3"
},

@@ -44,0 +45,0 @@ "devDependencies": {

# dotenv
A Javascript (nodejs) port of the Go [dotenv](https://github.com/joho/godotenv) project (which loads env vars from a .env file).
Written in typescript, full testing.
From the original Library:
It can loads environment variables from a `.env` file into [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env) or parse `<key>=<value>` string
Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables.
But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. Dotenv load variables from a .env file into ENV when the environment is bootstrapped.
It can be used as a library (for loading in env for your own daemons etc.)
## Installation

@@ -37,4 +31,2 @@

While `.env` in the project root is the default, you don't have to be constrained, both examples below are 100% legit
If you want to be really fancy with your env file you can do comments and exports (below is a valid env file)

@@ -55,1 +47,40 @@

```
Multiple line is OK.
```shell
MULTI_DOUBLE_QUOTED="THIS
IS
A
MULTILINE
STRING"
```
Expand variables is OK.
```shellOPTION_A=1
OPTION_B=${OPTION_A}
OPTION_C=$OPTION_B
OPTION_D=${OPTION_A}${OPTION_B}
OPTION_E=${OPTION_NOT_DEFINED}
```
## Command Mode
```shell
npm i create-dotenv -g
```
### Usage
Execute commands using key-value pairs.
```shell
dotenv-cli -v KEY=VALUE -- bash -c 'echo "$BASIC"'
```
Execute commands using enviroment file.
```shell
dotenv-cli -e .env -- bash -c 'echo "$BASIC"'
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc