Files
lobe-chat/scripts/electronWorkflow/moveNextExports.ts
T

19 lines
679 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import fs from 'fs-extra';
import path from 'node:path';
const rootDir = path.resolve(__dirname, '../..');
const exportSourceDir = path.join(rootDir, 'out');
const exportTargetDir = path.join(rootDir, 'apps/desktop/dist/next');
if (fs.existsSync(exportSourceDir)) {
console.log(`📦 Copying Next export assets from ${exportSourceDir} to ${exportTargetDir}...`);
fs.ensureDirSync(exportTargetDir);
fs.copySync(exportSourceDir, exportTargetDir, { overwrite: true });
console.log(`✅ Export assets copied successfully!`);
} else {
console.log(`️ No Next export output found at ${exportSourceDir}, skipping copy.`);
}
console.log(`🎉 Export move completed!`);