refactor: use --env CLI arg (#2204)
This change replaces the use of the Standard Library's `dotenv.load()` with the native `--env` CLI flag. The benefits include: * One less dependency * More obvious consumption of the `.env` file in the CLI output
This commit is contained in:
@@ -44,8 +44,8 @@ Here's what the diff of `deno.json` looks like:
|
||||
{
|
||||
"lock": false,
|
||||
"tasks": {
|
||||
- "start": "deno run -A --watch=static/,routes/ dev.ts"
|
||||
+ "start": "deno run -A --watch=src/static/,src/routes/ src/dev.ts"
|
||||
- "start": "deno run -A --watch=static/,routes/ --env dev.ts"
|
||||
+ "start": "deno run -A --watch=src/static/,src/routes/ --env src/dev.ts"
|
||||
},
|
||||
"imports": {
|
||||
"$fresh/": "file:///Users/reed/code/fresh/",
|
||||
|
||||
@@ -13,8 +13,6 @@ you'll end up with a `main.ts` like the following:
|
||||
/// <reference lib="dom.asynciterable" />
|
||||
/// <reference lib="deno.ns" />
|
||||
|
||||
import "$std/dotenv/load.ts";
|
||||
|
||||
import { start } from "$fresh/server.ts";
|
||||
import manifest from "./fresh.gen.ts";
|
||||
import config from "./fresh.config.ts";
|
||||
|
||||
Reference in New Issue
Block a user