A Node.js tool to convert Svelte component documentation to LLM-friendly markdown format.
pnpm i -D svelte-doc-llm
# or
npm install -g svelte-doc-llm
# or
npx svelte-doc-llm
llm.config.js file in your project root (optional)svelte-doc-llm in your project directoryConfiguration can be provided in a llm.config.js file:
export default {
srcDir: "./src/routes/docs", // Input directory with markdown files
outDir: "./static/llm", // Output directory for processed files
format: "md", // Output format
dataDir: "./src/routes/component-data", // Directory with component JSON data
ignore: [], // Sections to remove (by heading)
stripPrefix: "docs",
cleanOutDir: true, // Whether to completely clean the output directory
// Required fields - must be provided in llm.config.js
baseUrl: null,
repo: null,
pkgName: null,
// Optional fields
contextOrder: ['pages', 'components', 'forms', 'typography', 'extend', 'utilities'],
docsDir: 'src/routes',
examplesDir: 'src/routes/docs-examples'
}
Default values will be used if no config file is found:
MIT
pnpm ch
pnpm cv
git add .
git commit -m "v0.5.1"
git push
pnpm changeset publish
git push --tags