fix(build): handle file exists error in build_package

This commit is contained in:
Hadi Minooei 2026-04-16 22:10:27 -07:00
parent bfbdae8e3a
commit bb8565ee9d

View file

@ -48,6 +48,9 @@ if (packageName === 'core') {
const docsSource = join(process.cwd(), '..', '..', 'docs');
const docsTarget = join(process.cwd(), 'dist', 'docs');
if (existsSync(docsSource)) {
if (existsSync(docsTarget)) {
execSync(`rm -rf "${docsTarget}"`);
}
cpSync(docsSource, docsTarget, { recursive: true, dereference: true });
console.log('Copied documentation to dist/docs');
}