5 lines
430 B
TypeScript
5 lines
430 B
TypeScript
export const Root = import.meta.resolve("../");
|
|
const index = await fetch(Root + "dist/index.html").then(r=>r.text());
|
|
export const HTML = index.replace(`</head>`, `<script type="module" src="${Root + "dist/core.js?/deno.json"}"></script></head>`);
|
|
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); |