@packmule/environment-pack
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

Environment Pack npm-latest

Populate process.env via .env files and at runtime.

Overview

Setup

Environment Pack is included in the complete and default editions.

Current Release

npm install --save-dev @packmule/environment-pack

Nightly Build

npm install --save-dev @packmule/environment-pack@nightly

API

EnvironmentPack(path?: string)
  .set(key: string, value: any)

Usage

Example

Use a .env file per environment and set the build timestamp at build time.

import Packmule from '@packmule/core';
import EnvironmentPack from '@packmule/environment-pack';

const pack = new EnvironmentPack(`.env.${environment}`).set('TIMESTAMP', +new Date());

const packmule = new Packmule();
packmule.add(pack);
return packmule.generate();

License

MIT


Package Sidebar

Install

npm i @packmule/environment-pack

Weekly Downloads

90

Version

2.1.0

License

MIT

Unpacked Size

6.96 kB

Total Files

11

Last publish

Collaborators

  • t.esterer
  • thasmo