mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 13:05:14 +03:00
10 lines
605 B
TypeScript
10 lines
605 B
TypeScript
// Writes src/component/site/legal-search.json, the ⌘K search's entries for the legal documents
|
|
// (legalSearch in lib/legal-documents.ts), so the search doesn't load the documents themselves. Run after
|
|
// changing a legal document; test/legal-search.test.ts fails while the file is out of date.
|
|
import path from "node:path"
|
|
import { legalSearch } from "../src/lib/legal-documents"
|
|
|
|
const file = path.join(import.meta.dir, "../src/component/site/legal-search.json")
|
|
await Bun.write(file, JSON.stringify(legalSearch(), null, 2) + "\n")
|
|
console.log(`legal-search.json: ${legalSearch().length} documents`)
|