fix flag names

This commit is contained in:
Seth Trowbridge 2023-07-30 14:01:14 -04:00
parent 1f6ab7cf47
commit 79c5a0aff0
1 changed files with 13 additions and 12 deletions

25
run.tsx
View File

@ -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");
}