Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorthand for IS_BUILD_MODE #2268

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Use IS_BUILD_MODE const
  • Loading branch information
mcgear committed Jan 26, 2024
commit 75a14264f008fd31bd17c896eac5781274ac980f
8 changes: 6 additions & 2 deletions src/dev/dev_command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { updateCheck } from "./update_check.ts";
import { DAY, dirname, fromFileUrl, join, toFileUrl } from "./deps.ts";
import { FreshConfig, Manifest as ServerManifest } from "../server/mod.ts";
import {
FreshConfig,
IS_BUILD_MODE,
Manifest as ServerManifest,
} from "../server/mod.ts";
import { build } from "./build.ts";
import { collect, ensureMinDenoVersion, generate, Manifest } from "./mod.ts";
import { startServer } from "../server/boot.ts";
Expand Down Expand Up @@ -38,7 +42,7 @@ export async function dev(
const manifest = (await import(toFileUrl(join(dir, "fresh.gen.ts")).href))
.default as ServerManifest;

if (Deno.args.includes("build")) {
if (IS_BUILD_MODE) {
const state = await getInternalFreshState(
manifest,
config ?? {},
Expand Down
Loading