mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
- Remove orphaned packages/ui/ dir and examples/next-mdx/ - Fix hanzo-docs wrapper copy-css.js to use @hanzo/docs-* paths - Fix radix-ui package name to @hanzo/docs-ui (not docs-radix-ui) - Fix duplicate external in hanzo-docs tsup.config.ts - Fix broken astro example import (fumadocs-core/toc) - Fix create-app template git config (fuma-nama → hanzoai) - Fix CSS class: not-fumadocs-codeblock → not-fd-codeblock - Fix .github configs (FUNDING, issue templates, PR template) - Fix remaining fumadocs branding in MDX content - Update LLM.md with current architecture
38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
import { cpSync, mkdirSync, existsSync } from 'fs';
|
|
import { dirname, join } from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const root = join(__dirname, '..');
|
|
|
|
// Copy twoslash.css from @hanzo/docs-twoslash (styles folder)
|
|
const twoslashStylesSource = join(root, 'node_modules/@hanzo/docs-twoslash/styles');
|
|
const twoslashDistDest = join(root, 'dist/twoslash');
|
|
|
|
// Copy openapi CSS from @hanzo/docs-openapi
|
|
const openapiCssSource = join(root, 'node_modules/@hanzo/docs-openapi/css');
|
|
const openapiCssDest = join(root, 'dist/openapi/css');
|
|
|
|
try {
|
|
// Copy twoslash.css if it exists
|
|
mkdirSync(twoslashDistDest, { recursive: true });
|
|
const twoslashCssSrc = join(twoslashStylesSource, 'twoslash.css');
|
|
if (existsSync(twoslashCssSrc)) {
|
|
cpSync(twoslashCssSrc, join(twoslashDistDest, 'twoslash.css'));
|
|
console.log('Copied twoslash.css');
|
|
}
|
|
|
|
// Copy openapi CSS if it exists
|
|
if (existsSync(openapiCssSource)) {
|
|
mkdirSync(openapiCssDest, { recursive: true });
|
|
cpSync(openapiCssSource, openapiCssDest, { recursive: true });
|
|
console.log('Copied openapi CSS');
|
|
}
|
|
|
|
console.log('CSS files copied successfully');
|
|
} catch (error) {
|
|
console.error('Error copying CSS files:', error);
|
|
// Don't fail build if CSS copy fails - these are optional
|
|
console.log('Continuing without CSS files');
|
|
}
|