auto booter

This commit is contained in:
Seth Trowbridge 2023-04-29 20:16:28 -04:00
parent f7f87f8f38
commit 1b16b08788
3 changed files with 10 additions and 3 deletions

View File

@ -2,13 +2,13 @@
"compilerOptions": {"lib": ["deno.window", "dom"]}, "compilerOptions": {"lib": ["deno.window", "dom"]},
"imports": "imports":
{ {
"react": "https://esm.sh/preact@10.13.2/compat", "react": "https://esm.sh/stable/preact@10.13.2/compat",
"preact": "https://esm.sh/stable/preact@10.13.2/",
"@deep/": "./deep/", "@deep/": "./deep/",
"@eno/app": "./app.tsx", "@eno/app": "./app.tsx",
"@eno/iso": "http://localhost:4507/lib/iso.tsx" "@eno/iso": "http://localhost:4507/lib/iso.tsx"
}, },
"tasks": { "tasks": {
"host": "deno run -A --unstable https://deno.land/std@0.181.0/http/file_server.ts", "dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx"
"dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock --config=deno.jsonc 'http://localhost:4507/server.tsx'"
} }
} }

View File

@ -7,6 +7,10 @@ export const CSS = {
hash:false hash:false
}; };
if(Deno)
{
import(import.meta.resolve("../../server.tsx")).then(()=>{console.log("...imported!");});
}
type Meta = {title:string, description:string, keywords:string, image:string, canonical:string } type Meta = {title:string, description:string, keywords:string, image:string, canonical:string }
type MetaKeys = keyof Meta; type MetaKeys = keyof Meta;

View File

@ -8,6 +8,8 @@ import * as Twind from "https://esm.sh/@twind/core@1.1.3";
import React from "react"; import React from "react";
import * as Iso from "@eno/iso"; import * as Iso from "@eno/iso";
Deno.env.set("initialized", "true");
/** /**
* Setup a transpiler. * Setup a transpiler.
* @param inDevMode When true, starts a file-watcher * @param inDevMode When true, starts a file-watcher
@ -275,6 +277,7 @@ const Path = {
}; };
console.log(Path); console.log(Path);
console.log(`Dev Mode: ${DevMode}`); console.log(`Dev Mode: ${DevMode}`);
console.log(`Args seen: ${Deno.args}`);
const {Transpileable, TranspileURL, SocketsHandler} = Transpiler(DevMode); const {Transpileable, TranspileURL, SocketsHandler} = Transpiler(DevMode);
const {Imports, App, TwindInst, Error} = await Configure(DevMode, Path.LibDir); const {Imports, App, TwindInst, Error} = await Configure(DevMode, Path.LibDir);