1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 05:09:41 +02:00

add more logs

This commit is contained in:
Nikita Melnikov 2022-12-14 21:26:40 +04:00
parent b72de6bdb2
commit 255832d26a
2 changed files with 13 additions and 2 deletions

View file

@ -1,7 +1,7 @@
{
"name": "codex.docs",
"license": "Apache-2.0",
"version": "v2.2.0-rc.3",
"version": "v2.2.0-rc.7",
"type": "module",
"bin": {
"codex.docs": "dist/backend/app.js"

View file

@ -118,11 +118,22 @@ export default async function buildStatic(): Promise<void> {
console.log('Static files built');
console.log('Copy public directory');
await fse.copy(path.resolve(dirname, '../../public'), distPath);
const publicDir = path.resolve(dirname, '../../public');
console.log(`Copy from ${publicDir} to ${distPath}`);
try {
await fse.copy(publicDir, distPath);
console.log('Public directory copied');
} catch (e) {
console.log('Error while copying public directory');
console.error(e);
}
if (appConfig.uploads.driver === 'local') {
console.log('Copy uploads directory');
await fse.copy(path.resolve(cwd, appConfig.uploads.local.path), path.resolve(distPath, 'uploads'));
console.log('Uploads directory copied');
}
}