5 lines
440 B
TypeScript
5 lines
440 B
TypeScript
const index = await fetch(import.meta.resolve("../dist/index.html")).then(r=>r.text());
|
|
export const HTML = index.replace(`</head>`, `<script type="module" src="/dist/bundle_entry.js?map&hmr"></script></head>`);
|
|
export const Root = import.meta.resolve("../");
|
|
export const Load =async(file:string)=> await fetch(Root + file).then(resp=>resp.text());
|
|
export const Save =async(text:string, name:string)=> await Deno.writeTextFile(name, text); |