Update Site source
This commit is contained in:
1 parent
bcd4667205
commit
ff08916cf0
6 files changed
+124
-63
No files matched your search
+2
-2
@@ -7,10 +7,10 @@ const meta = new URL("../dist/.openai/", import.meta.url);
|
||||
|
||||
await rm(dist, { recursive: true, force: true });
|
||||
await Promise.all([mkdir(server, { recursive: true }), mkdir(meta, { recursive: true })]);
|
||||
const [rawIndexHtml, addonsJs] = await Promise.all([text("index.html"), text("addons.js")]);
|
||||
const [rawIndexHtml, addonsJs, i18nJs, i18nRenderersJs] = await Promise.all([text("index.html"), text("addons.js"), text("i18n.js"), text("i18n-renderers.js")]);
|
||||
const release = "1.1.0";
|
||||
const indexHtml = rawIndexHtml.replace('src="addons.js"', `src="addons.js?v=${release}"`);
|
||||
await writeFile(new URL("assets.js", server), `export const indexHtml=${JSON.stringify(indexHtml)};\nexport const addonsJs=${JSON.stringify(addonsJs)};\n`);
|
||||
await writeFile(new URL("assets.js", server), `export const indexHtml=${JSON.stringify(indexHtml)};\nexport const addonsJs=${JSON.stringify(addonsJs)};\nexport const i18nJs=${JSON.stringify(i18nJs)};\nexport const i18nRenderersJs=${JSON.stringify(i18nRenderersJs)};\n`);
|
||||
await copyFile(new URL("../worker/index.js", import.meta.url), new URL("index.js", server));
|
||||
await copyFile(new URL("../.openai/hosting.json", import.meta.url), new URL("hosting.json", meta));
|
||||
console.log("Built Life OS Worker artifact");
|
||||
Reference in new issue
Block a user