Skip to content

Commit

Permalink
docs: update packages' README
Browse files Browse the repository at this point in the history
  • Loading branch information
chihab committed Jan 13, 2024
1 parent 78058ce commit 872a679
Show file tree
Hide file tree
Showing 24 changed files with 159 additions and 110 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ and the following `dotenv.run` options:

### @dotenv-run/cli

`@dotenv-run/cli` is a standalone CLI that can be used to run a script.
[`@dotenv-run/cli`](https://www.npmjs.com/package/@dotenv-run/cli) is a standalone CLI that can be used to run a script.

```sh
❯ npx dotenv-run
Expand All @@ -112,7 +112,7 @@ and the following `dotenv.run` options:

### @dotenv-run/esbuild

`@dotenv-run/esbuild` is a plugin for esbuild that can be used to inject environment variables into your applications.
[`@dotenv-run/esbuild`](https://www.npmjs.com/package/@dotenv-run/esbuild) is a plugin for esbuild that can be used to inject environment variables into your applications.

```ts
import { dotenvRun } from "@dotenv-run/esbuild";
Expand All @@ -133,7 +133,7 @@ await build({

### @ngx-env/builder

`@ngx-env/builder` is a plugin for Angular CLI and a wrapper around `@dotenv-run/esbuild` or `@dotenv-run/webpack` that can be used to inject environment variables into your Angular applications.
[`@ngx-env/builder`](https://www.npmjs.com/package/@ngx-env/builder) is a plugin for Angular CLI and a wrapper around `@dotenv-run/esbuild` or `@dotenv-run/webpack` that can be used to inject environment variables into your Angular applications.

- ✅ Official recommendation in [dotenv documentation](https://www.dotenv.org/docs/frameworks/angular/vercel) 🔥
- ✅ Webpack and ESBuild support 🚀
Expand Down Expand Up @@ -204,7 +204,7 @@ You can find the full `@ngx-env/builder` documentation [here](https://github.com

### @dotenv-run/webpack

`@dotenv-run/webpack` is a plugin for webpack that can be used to inject environment variables into your applications.
[`@dotenv-run/webpack`](https://www.npmjs.com/package/@dotenv-run/webpack) is a plugin for webpack that can be used to inject environment variables into your applications.

```ts
import { DotenvRunPlugin } from "@dotenv-run/webpack";
Expand All @@ -229,7 +229,7 @@ export default {

### @dotenv-run/rollup

`@dotenv-run/rollup` is a plugin for rollup that can be used to inject environment variables into your applications.
[`@dotenv-run/rollup`](https://www.npmjs.com/package/@dotenv-run/rollup) is a plugin for rollup that can be used to inject environment variables into your applications.

```js
import env from "@dotenv-run/rollup";
Expand All @@ -245,7 +245,7 @@ export default {

### @dotenv-run/core

`@dotenv-run/core` is the core package that can be used to load environment variables from `.env` files.
[`@dotenv-run/core`](https://www.npmjs.com/package/@dotenv-run/core) is the core package that can be used to load environment variables from `.env` files.

```ts
env({
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @dotenv-run/docs

## 0.1.4

### Patch Changes

- docs: updates packages' README files

## 0.1.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@dotenv-run/docs",
"private": true,
"type": "module",
"version": "0.1.3",
"version": "0.1.4",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/ng-app-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@angular/compiler-cli": "^16.0.0",
"@types/node": "^16.0.0",
"cross-env": "^7.0.3",
"@dotenv-run/webpack": "^1.3.3",
"@dotenv-run/webpack": "^1.3.4",
"typescript": "~4.9.3"
}
}
8 changes: 4 additions & 4 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"e2e:all": "nx run-many --target=e2e --all --parallel"
},
"devDependencies": {
"@dotenv-run/cli": "^1.3.4",
"@dotenv-run/load": "^1.3.3",
"@dotenv-run/webpack": "^1.3.3",
"@dotenv-run/rollup": "^1.3.3",
"@dotenv-run/cli": "^1.3.5",
"@dotenv-run/load": "^1.3.4",
"@dotenv-run/webpack": "^1.3.4",
"@dotenv-run/rollup": "^1.3.4",
"webpack": "^5.0.0",
"serve": "^14.2.1",
"@playwright/test": "^1.37.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"copy-dist": "ts-node tools/schema-dist.ts"
},
"dependencies": {
"@dotenv-run/esbuild": "^1.3.3",
"@dotenv-run/webpack": "^1.3.3",
"@dotenv-run/esbuild": "^1.3.4",
"@dotenv-run/webpack": "^1.3.4",
"glob": "^10.3.10"
},
"devDependencies": {
Expand All @@ -40,7 +40,7 @@
"@angular-devkit/architect": "^0.1700.8",
"@angular-devkit/core": "^17.0.0",
"@angular/compiler": "^17.0.2",
"@dotenv-run/core": "^1.3.3",
"@dotenv-run/core": "^1.3.4",
"cpy": "^8.1.2",
"karma": "^6.4.2",
"ts-node": "^10.8.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @dotenv-run/cli

## 1.3.5

### Patch Changes

- docs: updates packages' README files
- Updated dependencies
- @dotenv-run/core@1.3.4

## 1.3.4

### Patch Changes
Expand Down
25 changes: 13 additions & 12 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ npm add -D @dotenv-run/cli
## Prompt

```sh
$> dotenv-run -h
❯ npx dotenv-run

Usage: dotenv-run [options] -- <command>
Usage: dotenv-run [options] -- <command>

Options:

-h, --help output usage information
-e, --env environment name (e.g. dev, prod)
-s, --silent do not print .env file paths
-r, --root root directory to search for .env files

Examples:
Options:
-v, --verbose [regexp] display debug information
-u, --unsecure display environment variables values
-e, --env [environment] environment to load (default: NODE_ENV)
-r, --root root directory to search for .env files
-f, --file [.env,.secrets] .env files to load (default: .env)
-h, --help output usage information

Examples:
dotenv-run -d
dotenv-run -- npm start
dotenv-run -r ../.. -- npm start
dotenv-run -e prod -- npm start
dotenv-run -r ../.. -p .env,.secrets -- npm start
dotenv-run -f ../.env,../.env.api -- npm start
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dotenv-run/cli",
"version": "1.3.4",
"version": "1.3.5",
"description": "cli to load environment variables with monorepo support",
"homepage": "https://github.com/chihab/dotenv-run",
"type": "module",
Expand All @@ -25,7 +25,7 @@
"author": "Chihab Otmani <chihab@gmail.com>",
"license": "ISC",
"dependencies": {
"@dotenv-run/core": "^1.3.3",
"@dotenv-run/core": "^1.3.4",
"chalk": "^4.1.0",
"cross-spawn": "^7.0.3",
"minimist": "^1.2.8"
Expand Down
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @dotenv-run/core

## 1.3.4

### Patch Changes

- docs: updates packages' README files

## 1.3.3

### Patch Changes
Expand Down
27 changes: 15 additions & 12 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@

# @dotenv-run/core

* ✅ Load environment variables from the command line `API_BASE=/v1/ core`
* ✅ Load environment variables from `.env` files
* ✅ Expand environment variables `API_URL=$API_BASE/users`
* ✅ Define environment variables for a specific environment (e.g. `.env.production`)
* ✅ Load priorities of `.env.*` files (e.g. `.env.production` > `.env`)
* ✅ Hierarchical cascading configuration in monorepo projects ([Nx](https://nx.dev), [Turbo](https://turbo.build/), etc.)
`apps/next-app/.env` > `apps/.env` > `.env`

- ✅ Load environment variables from the command line `API_BASE=/v1/ core`
- ✅ Load environment variables from `.env` files
- ✅ Expand environment variables `API_URL=$API_BASE/users`
- ✅ Define environment variables for a specific environment (e.g. `.env.production`)
- ✅ Load priorities of `.env.*` files (e.g. `.env.production` > `.env`)
- ✅ Hierarchical cascading configuration in monorepo projects ([Nx](https://nx.dev), [Turbo](https://turbo.build/), etc.)
`apps/next-app/.env` > `apps/.env` > `.env`

# Install

Expand All @@ -20,8 +18,13 @@ npm add @dotenv-run/core

```js
// index.js
import { expand, paths } from "@dotenv-run/core";
expand(paths(process.env.NODE_ENV, '../../'));
import { env } from "@dotenv-run/core";
env({
root: "../..",
verbose: true,
prefix: "^API_",
files: [".env"],
});
console.log(process.env.API_USERS);
```

Expand All @@ -33,7 +36,7 @@ given the following files:
API_AUTH=$API_BASE/v1/auth
.env.dev
API_BASE=https://localhost:3000
.env.prod
.env.prod
API_BASE=https://dotenv-run.app
```

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dotenv-run/core",
"version": "1.3.3",
"version": "1.3.4",
"description": "core library to load environment variables with monorepo support",
"homepage": "https://github.com/chihab/dotenv-run",
"main": "dist/cjs/index.js",
Expand Down
8 changes: 8 additions & 0 deletions packages/esbuild/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @dotenv-run/esbuild

## 1.3.4

### Patch Changes

- docs: updates packages' README files
- Updated dependencies
- @dotenv-run/core@1.3.4

## 1.3.3

### Patch Changes
Expand Down
22 changes: 12 additions & 10 deletions packages/esbuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import { env } from "@dotenv-run/esbuild";

const { full } = env({
prefix: "MY_",
verbose: true,
verbose: false,
files: [".env"],
});

await build({
const results = await build({
bundle: true,
write: false,
entryPoints: [`test/app.js`],
Expand All @@ -39,17 +40,18 @@ await build({

```js
import { build } from "esbuild";
import { env } from "@dotenv-run/esbuild";

const { full } = env({
prefix: "MY_",
verbose: true,
});
import { dotenvRun } from "@dotenv-run/esbuild";

await build({
bundle: true,
write: false,
bundle: true,
entryPoints: [`test/app.js`],
define: full,
plugins: [
dotenvRun({
verbose: true,
root: "../../",
prefix: "^API",
}),
],
});
```
4 changes: 2 additions & 2 deletions packages/esbuild/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dotenv-run/esbuild",
"version": "1.3.3",
"version": "1.3.4",
"description": "Run your scripts with dotenv variables",
"homepage": "https://github.com/chihab/dotenv-run",
"main": "dist/cjs/index.js",
Expand All @@ -26,7 +26,7 @@
"author": "Chihab Otmani <chihab@gmail.com>",
"license": "ISC",
"dependencies": {
"@dotenv-run/core": "^1.3.3"
"@dotenv-run/core": "^1.3.4"
},
"peerDependencies": {
"esbuild": "0.19.5"
Expand Down
8 changes: 8 additions & 0 deletions packages/load/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @dotenv-run/load

## 1.3.4

### Patch Changes

- docs: updates packages' README files
- Updated dependencies
- @dotenv-run/core@1.3.4

## 1.3.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/load/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dotenv-run/load",
"version": "1.3.3",
"version": "1.3.4",
"description": "Perload your scripts with dotenv variables",
"homepage": "https://github.com/chihab/dotenv-run",
"main": "dist/index.js",
Expand All @@ -22,7 +22,7 @@
"author": "Chihab Otmani <chihab@gmail.com>",
"license": "ISC",
"dependencies": {
"@dotenv-run/core": "^1.3.3"
"@dotenv-run/core": "^1.3.4"
},
"devDependencies": {
"@types/node": "^16.0.0"
Expand Down
8 changes: 8 additions & 0 deletions packages/rollup/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @dotenv-run/rollup

## 1.3.4

### Patch Changes

- docs: updates packages' README files
- Updated dependencies
- @dotenv-run/core@1.3.4

## 1.3.3

### Patch Changes
Expand Down
Loading

0 comments on commit 872a679

Please sign in to comment.