0.1.4 • Published 11 months ago

@dot/env v0.1.4

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
11 months ago

@dot/env

Load environment variables from .env files.

This tiny package composes a few packages in order to load .env intelligently:

  • dotenv
  • dotenv-expand
  • find-up

Differences with dotenv:

  • Automatically expands variables such as ${NODE_ENV} within the .env files
  • Searches the immediate directory (current working directory) for an .env file, and if not found, continues to look in parent directories until a .env file is found, or .git is encountered.

Possible future features:

  • Composing multiple .env files
  • Extending .env files

Requirements

This package requires an Active LTS Node version (v18+).

Install

Using pnpm:

pnpm add @dot/env

Usage

Usage is straightforward:

import '@dot/env';

That's it. You're good to go.

Meta

CONTRIBUTING

LICENSE (Mozilla Public License)