From 79c5a0aff00d28e5bd3f7966389d454eb54b4919 Mon Sep 17 00:00:00 2001 From: Seth Trowbridge Date: Sun, 30 Jul 2023 14:01:14 -0400 Subject: [PATCH] fix flag names --- run.tsx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/run.tsx b/run.tsx index 1fa0c64..55c37b3 100644 --- a/run.tsx +++ b/run.tsx @@ -1,15 +1,5 @@ import * as Serve from "./run-serve.tsx"; -export default function(config:Serve.ConfigurationArgs) -{ - if(Deno.env.get("deploy")) - { - return; - } - Serve.Configure(config) - Serve.default(); -} - Deno.args.forEach(arg=> { if(arg.startsWith("--")) @@ -18,14 +8,25 @@ Deno.args.forEach(arg=> Deno.env.set(kvp[0], kvp[1] || "true"); } }); +const isDeploy = Deno.env.get("dep"); +const isDevelop = Deno.env.get("dev"); -if(Deno.env.get("dep")) +export default function(config:Serve.ConfigurationArgs) +{ + if(!isDeploy) + { + Serve.Configure(config) + Serve.default(); + } +} + +if(isDeploy) { import("./run-deploy.tsx"); } else { - if(Deno.env.get("dev")) + if(isDevelop) { await import("./run-local.tsx"); }