Files
zooqueenandHanzo Dev 685c94fd09
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
Hanzo CI/CD / test-amd64 (push) Successful in 8m7s
Hanzo CI/CD / cicd (push) Skipped
Hanzo CI/CD / verify (push) Skipped
CI/CD / cicd (push) Successful in 8m9s
refactor(ts): standardize scripts, helpers, and Next configs to .ts
Co-authored-by: Hanzo Dev <[email protected]>
2026-11-10 18:49:10 -08:00

38 lines
1.3 KiB
TypeScript

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');
}