mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
15 lines
401 B
JavaScript
15 lines
401 B
JavaScript
|
|
import { generateFiles, generateMDX } from 'fumadocs-typescript';
|
||
|
|
import * as path from 'node:path';
|
||
|
|
import * as fs from 'node:fs/promises';
|
||
|
|
|
||
|
|
console.log("Generating files...");
|
||
|
|
|
||
|
|
void generateFiles({
|
||
|
|
input: ['./content/docs/**/*.model.mdx'],
|
||
|
|
// Rename x.model.mdx to x.mdx
|
||
|
|
output: (file) =>
|
||
|
|
path.resolve(
|
||
|
|
path.dirname(file),
|
||
|
|
`${path.basename(file).split('.')[0]}.mdx`,
|
||
|
|
),
|
||
|
|
});
|