dreaded-fixes #7

Merged
SethTrowbridge merged 7 commits from dreaded-fixes into master 2023-10-16 13:30:24 -04:00
5 changed files with 22 additions and 4 deletions
Showing only changes of commit 9e7fe002b0 - Show all commits

View File

@ -167,8 +167,8 @@ export async function Check()
const importMap = imports.json.imports as Record<string, string>; const importMap = imports.json.imports as Record<string, string>;
const bake =async(obj:ConfigCheck)=> await Deno.writeTextFile(Deno.cwd()+"/"+obj.path, JSON.stringify(obj.json, null, "\t")); const bake =async(obj:ConfigCheck)=> await Deno.writeTextFile(Deno.cwd()+"/"+obj.path, JSON.stringify(obj.json, null, "\t"));
importMap["react"] = `https://esm.sh/preact@10.17.1/compat`; importMap["react"] = `https://esm.sh/preact@10.18.1/compat`;
importMap["react/"] = `https://esm.sh/preact@10.17.1/compat/`; importMap["react/"] = `https://esm.sh/preact@10.18.1/compat/`;
importMap["@preact/signals"] = `https://esm.sh/@preact/signals@1.2.1`; importMap["@preact/signals"] = `https://esm.sh/@preact/signals@1.2.1`;
importMap["@twind/core"] = `https://esm.sh/@twind/core@1.1.3`; importMap["@twind/core"] = `https://esm.sh/@twind/core@1.1.3`;
importMap[">able/"] = `${RootHost}`; importMap[">able/"] = `${RootHost}`;

View File

@ -1,8 +1,10 @@
{ {
"imports": { "imports": {
"react": "https://esm.sh/preact@10.17.1/compat", "react": "https://esm.sh/preact@10.17.1/compat",
"react-original": "https://esm.sh/preact@10.17.1/compat",
"react/": "https://esm.sh/preact@10.17.1/compat/", "react/": "https://esm.sh/preact@10.17.1/compat/",
"@preact/signals": "https://esm.sh/@preact/signals@1.2.1", "@preact/signals": "https://esm.sh/@preact/signals@1.2.1",
"signals-original": "https://esm.sh/@preact/signals@1.2.1",
"@twind/core": "https://esm.sh/@twind/core@1.1.3", "@twind/core": "https://esm.sh/@twind/core@1.1.3",
">able/": "http://localhost:4507/", ">able/": "http://localhost:4507/",
">able/app.tsx": "./app.tsx" ">able/app.tsx": "./app.tsx"

View File

@ -0,0 +1,16 @@
import * as SignalsParts from "signals-original";
import { Process } from "./hmr-listen.tsx";
const s1 = SignalsParts.signal(true);
const proxySignal =(arg)=>
{
console.log("---hmr---", arg);
return SignalsParts.signal(arg);
}
export * from "signals-original";
export { proxySignal as signal };
// ? export {ProxyCreate as createElement, ProxyState as useState, ProxyReducer as useReducer };
// ? export default {...ReactParts, createElement:ProxyCreate, useState:ProxyState, useReducer:ProxyReducer};

View File

@ -29,7 +29,7 @@ Configure({
inImports["react"] = `/>able/hmr-react.tsx`; inImports["react"] = `/>able/hmr-react.tsx`;
inImports["signals-original"] = inImports["@preact/signals"]; inImports["signals-original"] = inImports["@preact/signals"];
inImports["@preact/signals"] = `/>able/hmr-signals.tsx`; inImports["@preact/signals"] = `/>able/hmr-signal.tsx`;
return inImports; return inImports;
}, },

View File

@ -74,7 +74,7 @@ let Configuration:Configuration =
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script type="importmap">${JSON.stringify(inMap)}</script> <script type="importmap">${JSON.stringify(inMap, null, " ")}</script>
<script type="module"> <script type="module">
import Mount from ">able/run-browser.tsx"; import Mount from ">able/run-browser.tsx";
Mount("#app", "${inConfig.Start}"); Mount("#app", "${inConfig.Start}");