chore: cleanup

This commit is contained in:
Adam
2025-12-28 06:41:54 -06:00
parent 69a15ae9c1
commit 82a876da4d
6 changed files with 85 additions and 85 deletions

View File

@@ -1,18 +0,0 @@
/**
* Injects the theme preload script into index.html.
* Run this as part of the build process.
*/
import { generatePreloadScript } from "@opencode-ai/ui/theme"
const htmlPath = new URL("../index.html", import.meta.url).pathname
const html = await Bun.file(htmlPath).text()
const script = generatePreloadScript()
const injectedHtml = html.replace(
/<script id="oc-theme-preload-script">\s*\/\* THEME_PRELOAD_SCRIPT \*\/\s*<\/script>/,
`<script id="oc-theme-preload-script">${script}</script>`,
)
await Bun.write(htmlPath, injectedHtml)
console.log("Injected theme preload script into index.html")