mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
20 lines
490 B
JavaScript
20 lines
490 B
JavaScript
import { rimraf } from 'rimraf';
|
|
import * as Python from 'fumadocs-python';
|
|
import * as fs from 'node:fs/promises';
|
|
|
|
async function generate() {
|
|
const out = 'content/docs/httpx';
|
|
await rimraf(out);
|
|
|
|
const content = JSON.parse(await fs.readFile('./httpx.json', 'utf-8'));
|
|
const converted = Python.convert(content, {
|
|
baseUrl: '/docs',
|
|
}).filter((file) => !file.path.startsWith('httpx/_transports'));
|
|
|
|
await Python.write(converted, {
|
|
outDir: out,
|
|
});
|
|
}
|
|
|
|
void generate();
|