1.2.1 • Published 9 months ago

@dragon-syndicate/dotenv-mono v1.2.1

Weekly downloads
-
License
NPOSL-3.0
Repository
github
Last release
9 months ago

dotenv-mono

Semantic Release

Initial Setup

  1. Install Node.js.
  2. Install pnpm.
  3. Run the command pnpm install.

Architecture

Environment variables are loaded from multiple folders, starting with the current working directory (cwd) and moving up the directory tree until the max depth is reached. The root directory is considered to be the directory at the top of the directory tree, based on the max depth. The environment variables will be loaded starting with the .env files in the root directory and then moving down the directory tree until the cwd is reached.

Variables are processed from the .env file into Environment variables based on when they are loaded. Variable interpolation is supported for all variables loaded from the .env files. If a variable has not already been loaded into the Environment variables and is referenced using interpolation, it will result in an empty string.

A variable defined in multiple .env files will be overwritten by the last .env file that is loaded. This means that the .env file in the cwd will overwrite any variables that are defined in the .env files in the parent directories.

ENV and an extension can be added to the .env files to load additional variables based on the extension. The .env files are loaded in the following order in each directory:

  1. .env
  2. .env.local
  3. .env.<ENV>
  4. .env.<ENV>.local
  5. .env.<extension>
  6. .env.<extension>.local
  7. .env.<extension>.<ENV>
  8. .env.<extension>.<ENV>.local

Release Process

  • The package will build all its files to the root dist folder to be published to npmjs
    • Semantic versioning and Changelog is implement via GitHub Actions
    • Deployment is implemented via GitHub Actions
    • Published Package only contains: - minified code - README.md - LICENSE.md - package.json (with private packages removed) - changelog

Development

  • Run command (Serves the application local on the developers machine):
    pnpm run dev
  • Test command (Executes the unit tests against the developers local copy of the repository):
    pnpm run test
  • Build command (Builds the application for deployment):
    pnpm run build
  • Clean command (Removes all build artifacts build dependencies):
    pnpm run clean

Additional Information

To locally test the release process you will need to run the command in the root directory cd dist && npx semantic-release --dry-run.

NOTE: This command will only work if you have already logged in to npmjs via the command npm login.

1.2.1

9 months ago

1.2.0

9 months ago

1.1.13

9 months ago

1.1.12

9 months ago

1.1.11

9 months ago

1.1.10

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago