exchange boot for "entry"
This commit is contained in:
parent
58d624ff54
commit
b038cecb08
@ -1,6 +0,0 @@
|
||||
import "./run-serve.tsx";
|
||||
|
||||
if(Deno.env.get("dev"))
|
||||
{
|
||||
await import("./run-local.tsx");
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
import "http://localhost:1234/boot.tsx";
|
||||
import React from "react";
|
||||
|
||||
const CTXString = React.createContext("lol");
|
||||
@ -37,8 +36,8 @@ export default ()=>
|
||||
const [Store, Dispatch] = React.useReducer(reducer, {name:"seth", age:24} as Store, builder)
|
||||
return <CTXString.Provider value="intradestink">
|
||||
<div class="my-4 font-sans">
|
||||
<h1 class="font-black text-xl text-red-500">Title????</h1>
|
||||
<h2>subtitle</h2>
|
||||
<h1 class="font-black text-xl text-red-500">Title</h1>
|
||||
<h2 class="font-black text-blue-500">subtitle</h2>
|
||||
<p>
|
||||
<button onClick={e=>Dispatch(1)}>{Store.name}|{Store.age}?</button>
|
||||
</p>
|
||||
|
@ -2,11 +2,12 @@
|
||||
"compilerOptions": { "lib": ["deno.window", "dom"] },
|
||||
"imports":
|
||||
{
|
||||
"react":"https://esm.sh/preact@10.15.1/compat"
|
||||
"react":"https://esm.sh/preact@10.15.1/compat",
|
||||
"entry":"./app.tsx"
|
||||
},
|
||||
"tasks":
|
||||
{
|
||||
"local": "deno run -A --no-lock --reload app.tsx --dev",
|
||||
"serve": "deno run -A --no-lock --reload app.tsx"
|
||||
"local": "deno run -A --no-lock --reload=http://localhost:1234 http://localhost:1234/run-local.tsx",
|
||||
"serve": "deno run -A --no-lock --reload=http://localhost:1234 http://localhost:1234/run-serve.tsx"
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { load } from "https://deno.land/std/dotenv/mod.ts";
|
||||
import { load } from "https://deno.land/std@0.194.0/dotenv/mod.ts";
|
||||
import { parse } from "https://deno.land/std@0.194.0/flags/mod.ts";
|
||||
|
||||
|
||||
|
@ -94,7 +94,7 @@ let Configuration:Configuration =
|
||||
<script type="importmap">${JSON.stringify(inMap)}</script>
|
||||
<script type="module">
|
||||
import Mount from "${import.meta.resolve("./boot.tsx")}";
|
||||
Mount("#app", document.location.origin+"${parts[1]??"/app.tsx"}");
|
||||
Mount("#app", "entry");
|
||||
</script>
|
||||
</body>
|
||||
</html>`, {status:200, headers:{"content-type":"text/html"}});
|
||||
|
Loading…
Reference in New Issue
Block a user