diff options
| author | Dax Raad <[email protected]> | 2025-07-09 11:25:58 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-07-09 11:25:58 -0400 |
| commit | 5c626e0a2fb787798363284ee6af8f6c68b41f58 (patch) | |
| tree | a2f6dc87ee9a0844c3f9317f58055e8857d0ff1c /packages/web | |
| parent | 8e9e3832198b9a575bdb7bb9f23eb45cf73ed199 (diff) | |
| download | opencode-5c626e0a2fb787798363284ee6af8f6c68b41f58.tar.gz opencode-5c626e0a2fb787798363284ee6af8f6c68b41f58.zip | |
ci: generate config schema as part of build
Diffstat (limited to 'packages/web')
| -rw-r--r-- | packages/web/astro.config.mjs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/web/astro.config.mjs b/packages/web/astro.config.mjs index aea32caec..38a339c74 100644 --- a/packages/web/astro.config.mjs +++ b/packages/web/astro.config.mjs @@ -7,6 +7,7 @@ import theme from "toolbeam-docs-theme" import config from "./config.mjs" import { rehypeHeadingIds } from "@astrojs/markdown-remark" import rehypeAutolinkHeadings from "rehype-autolink-headings" +import { spawnSync } from "child_process" const github = "https://github.com/sst/opencode" @@ -26,7 +27,9 @@ export default defineConfig({ markdown: { rehypePlugins: [rehypeHeadingIds, [rehypeAutolinkHeadings, { behavior: "wrap" }]], }, + build: {}, integrations: [ + configSchema(), solidJs(), starlight({ title: "opencode", @@ -83,3 +86,15 @@ export default defineConfig({ "/discord": "https://discord.com/invite/opencode", }, }) + +function configSchema() { + return { + name: "configSchema", + hooks: { + "astro:build:done": async () => { + console.log("generating config schema") + spawnSync("../opencode/script/schema.ts", ["./dist/config.json"]) + }, + }, + } +} |
