Skip to content

Commit

Permalink
docs: add dotenv alternatives (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayllyz authored Nov 9, 2024
1 parent d5d950e commit f56a185
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ESLint plugin.
- [`bluebird` / `q`](./bluebird-q.md)
- [`cpx`](./cpx.md)
- [`deep-equal`](./deep-equal.md)
- [`dotenv`](./dotenv.md)
- [`eslint-plugin-es`](./eslint-plugin-es.md)
- [`eslint-plugin-eslint-comments`](./eslint-plugin-eslint-comments.md)
- [`eslint-plugin-import`](./eslint-plugin-import.md)
Expand Down
24 changes: 24 additions & 0 deletions docs/modules/dotenv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# dotenv

Although dotenv is reliable, it may not be necessary or may lack certain features.

## Alternatives

### dotenvx

Modern and secure alternative by the same author. It supports encryption, and multi-environment configs.

[Project Page](https://github.com/dotenvx/dotenvx)
[npm](https://www.npmjs.com/package/@dotenvx/dotenvx)

### Node.js --env-file

Built into Node.js since v20.6.0. Zero dependencies, good for simple use cases.

```bash
node --env-file=.env index.js
```

Also supported by [tsx](https://www.npmjs.com/package/tsx), [Bun](https://bun.sh/docs/runtime/env#manually-specifying-env-files), and [Deno](https://docs.deno.com/runtime/reference/env_variables/#.env-file).

[Node docs](https://nodejs.org/dist/latest-v20.x/docs/api/cli.html#--env-fileconfig)
6 changes: 6 additions & 0 deletions manifests/preferred.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
"docPath": "deep-equal",
"category": "preferred"
},
{
"type": "documented",
"moduleName": "dotenv",
"docPath": "dotenv",
"category": "preferred"
},
{
"type": "documented",
"moduleName": "eslint-plugin-es",
Expand Down

0 comments on commit f56a185

Please sign in to comment.