дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
docs/plugins/themes.md and indexing.md move to plugins/. Update the theme doc generator, its test, the plugin template, AGENTS.md and every link to the new paths.
15 рядки
661 B
TypeScript
15 рядки
661 B
TypeScript
/**
|
|
* Regenerates the token reference in plugins/themes.md from
|
|
* src/styles/tokens.css (`pnpm gen:theme-docs`). scripts/theme/theme.test.ts
|
|
* fails when the checked-in reference is stale.
|
|
*/
|
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
import { referenceMarkdown, themeTokenGroups, withReference } from "./tokens.ts";
|
|
|
|
const DOC = "plugins/themes.md";
|
|
const groups = themeTokenGroups(readFileSync("src/styles/tokens.css", "utf8"));
|
|
const doc = readFileSync(DOC, "utf8");
|
|
const next = withReference(doc, referenceMarkdown(groups));
|
|
if (next !== doc) writeFileSync(DOC, next);
|
|
console.log(next === doc ? `${DOC} is up to date` : `updated ${DOC}`);
|