diff --git a/demo/deno.json b/demo/deno.json index 2968f465..bb206679 100644 --- a/demo/deno.json +++ b/demo/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts" + "start": "deno run -A --watch=static/,routes/ dev.ts" }, "imports": { "$fresh/": "../", diff --git a/docs/latest/examples/changing-the-src-dir.md b/docs/latest/examples/changing-the-src-dir.md index 0f7160b2..a85dea6e 100644 --- a/docs/latest/examples/changing-the-src-dir.md +++ b/docs/latest/examples/changing-the-src-dir.md @@ -44,8 +44,8 @@ Here's what the diff of `deno.json` looks like: { "lock": false, "tasks": { -- "start": "deno run -A --watch=static/,routes/ --env dev.ts" -+ "start": "deno run -A --watch=src/static/,src/routes/ --env src/dev.ts" +- "start": "deno run -A --watch=static/,routes/ dev.ts" ++ "start": "deno run -A --watch=src/static/,src/routes/ src/dev.ts" }, "imports": { "$fresh/": "file:///Users/reed/code/fresh/", diff --git a/docs/latest/examples/using-twind-v1.md b/docs/latest/examples/using-twind-v1.md index fbe1722a..2aad8898 100644 --- a/docs/latest/examples/using-twind-v1.md +++ b/docs/latest/examples/using-twind-v1.md @@ -13,6 +13,8 @@ you'll end up with a `main.ts` like the following: /// /// +import "$std/dotenv/load.ts"; + import { start } from "$fresh/server.ts"; import manifest from "./fresh.gen.ts"; import config from "./fresh.config.ts"; diff --git a/init.ts b/init.ts index 1c10160b..56035e96 100644 --- a/init.ts +++ b/init.ts @@ -523,6 +523,8 @@ let MAIN_TS = `/// /// /// +import "$std/dotenv/load.ts"; + import { start } from "$fresh/server.ts"; import manifest from "./fresh.gen.ts"; import config from "./fresh.config.ts"; @@ -538,6 +540,8 @@ const DEV_TS = `#!/usr/bin/env -S deno run -A --watch=static/,routes/ import dev from "$fresh/dev.ts"; import config from "./fresh.config.ts"; +import "$std/dotenv/load.ts"; + await dev(import.meta.url, "./main.ts", config); `; const DEV_TS_PATH = join(resolvedDirectory, "dev.ts"); @@ -555,7 +559,7 @@ const config = { "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx", cli: "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -", manifest: "deno task cli manifest $(pwd)", - start: "deno run -A --watch=static/,routes/ --env dev.ts", + start: "deno run -A --watch=static/,routes/ dev.ts", build: "deno run -A dev.ts build", preview: "deno run -A main.ts", update: "deno run -A -r https://fresh.deno.dev/update .", diff --git a/tests/fixture_base_path/deno.json b/tests/fixture_base_path/deno.json index a70ad781..7802f6a0 100644 --- a/tests/fixture_base_path/deno.json +++ b/tests/fixture_base_path/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts" + "start": "deno run -A --watch=static/,routes/ dev.ts" }, "imports": { "$fresh/": "../../", diff --git a/tests/fixture_island_nesting/deno.json b/tests/fixture_island_nesting/deno.json index 583ebf6e..752aae1f 100644 --- a/tests/fixture_island_nesting/deno.json +++ b/tests/fixture_island_nesting/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts" + "start": "deno run -A --watch=static/,routes/ dev.ts" }, "imports": { "$fresh/": "../../", diff --git a/tests/fixture_partials/deno.json b/tests/fixture_partials/deno.json index 13762141..c4df0177 100644 --- a/tests/fixture_partials/deno.json +++ b/tests/fixture_partials/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts" + "start": "deno run -A --watch=static/,routes/ dev.ts" }, "imports": { "$fresh/": "../../", diff --git a/tests/fixture_route_analysis/deno.json b/tests/fixture_route_analysis/deno.json index a5043503..4ec11b09 100644 --- a/tests/fixture_route_analysis/deno.json +++ b/tests/fixture_route_analysis/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts", + "start": "deno run -A --watch=static/,routes/ dev.ts", "update": "deno run -A -r https://fresh.deno.dev/update ." }, "imports": { diff --git a/tests/fixture_route_analysis/main.ts b/tests/fixture_route_analysis/main.ts index dedce9cb..8ef5d924 100644 --- a/tests/fixture_route_analysis/main.ts +++ b/tests/fixture_route_analysis/main.ts @@ -4,6 +4,8 @@ /// /// +import "$std/dotenv/load.ts"; + import { start } from "$fresh/server.ts"; import manifest from "./fresh.gen.ts"; diff --git a/tests/fixture_server_components/deno.json b/tests/fixture_server_components/deno.json index ee5b70cb..6f39b459 100644 --- a/tests/fixture_server_components/deno.json +++ b/tests/fixture_server_components/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts" + "start": "deno run -A --watch=static/,routes/ dev.ts" }, "imports": { "$fresh/": "../../", diff --git a/tests/fixture_twind_app/deno.json b/tests/fixture_twind_app/deno.json index ee5b70cb..6f39b459 100644 --- a/tests/fixture_twind_app/deno.json +++ b/tests/fixture_twind_app/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts" + "start": "deno run -A --watch=static/,routes/ dev.ts" }, "imports": { "$fresh/": "../../", diff --git a/tests/fixture_twind_hydrate/deno.json b/tests/fixture_twind_hydrate/deno.json index d01fbf1a..81c87e73 100644 --- a/tests/fixture_twind_hydrate/deno.json +++ b/tests/fixture_twind_hydrate/deno.json @@ -1,7 +1,7 @@ { "lock": false, "tasks": { - "start": "deno run -A --watch=static/,routes/ --env dev.ts" + "start": "deno run -A --watch=static/,routes/ dev.ts" }, "imports": { "$fresh/": "../../", diff --git a/tests/init_test.ts b/tests/init_test.ts index bf0be9b0..4b6f9be0 100644 --- a/tests/init_test.ts +++ b/tests/init_test.ts @@ -406,7 +406,7 @@ Deno.test({ await t.step("start up the server", async () => { const { serverProcess, lines, address } = await startFreshServer({ - args: ["run", "-A", "--no-check", "--env", "dev.ts"], + args: ["run", "-A", "--no-check", "dev.ts"], cwd: tmpDirName, }); @@ -433,7 +433,7 @@ Deno.test({ }).output(); const { serverProcess, lines, address, output } = await startFreshServer({ - args: ["run", "-A", "--no-check", "--env", "main.ts"], + args: ["run", "-A", "--no-check", "main.ts"], cwd: tmpDirName, }); diff --git a/www/deno.json b/www/deno.json index 309b1632..0a2b7cf6 100644 --- a/www/deno.json +++ b/www/deno.json @@ -2,7 +2,7 @@ "lock": false, "nodeModulesDir": true, "tasks": { - "start": "deno run -A --watch=static/,routes/,../src,../docs --env dev.ts", + "start": "deno run -A --watch=static/,routes/,../src,../docs dev.ts", "build": "deno run -A dev.ts build", "preview": "deno run -A main.ts" },