-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Pinta365/0.2.6
load module
- Loading branch information
Showing
5 changed files
with
56 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@cross/env", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"exports": "./mod.ts", | ||
|
||
"tasks": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Automatically loads environment variables at the start of the application. | ||
* | ||
* By default, this script enables the loading of `.env` files, merging their values | ||
* with the existing environment variables. This behavior is customizable in the | ||
* main setup function if different behavior is desired. | ||
* | ||
* @module load | ||
*/ | ||
|
||
import { setupEnv } from "./mod.ts"; | ||
|
||
// Invoke the setupEnv function with default options for automatic environment variable loading. | ||
// The `dotEnv` option is enabled by default to automatically load variables from a `.env` file. | ||
try { | ||
await setupEnv({ | ||
dotEnv: { | ||
enabled: true, | ||
}, | ||
}); | ||
} catch (error) { | ||
console.error("Failed to load environment variables:", error); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters