1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-04 21:15:23 +02:00

some fixes

This commit is contained in:
Nikita Melnikov 2022-10-08 23:02:34 +08:00
parent 462dda6be9
commit 24843ec040
4 changed files with 11 additions and 5 deletions

2
.gitignore vendored
View file

@ -75,7 +75,7 @@ db/
.DS_Store
# Uploads
/public/uploads
/uploads
/public/uploads_test
# Compiled files

View file

@ -3,7 +3,7 @@ host: "localhost"
uploads:
driver: "local"
local:
path: "./public/uploads"
path: "./uploads"
s3:
bucket: "my-bucket"
region: "eu-central-1"

View file

@ -1,7 +1,7 @@
{
"name": "codex.docs",
"license": "Apache-2.0",
"version": "0.0.1-alpha.6",
"version": "0.0.1-alpha.8",
"type": "module",
"bin": {
"codex.docs": "dist/backend/app.js"

View file

@ -112,8 +112,14 @@ export default async function buildStatic(): Promise<void> {
}
await renderIndexPage(config.indexPageUri);
await fse.copy(path.resolve(dirname, '../../public'), distPath);
console.log('Static files built');
console.log('Copy public directory');
await fse.copy(path.resolve(dirname, '../../public'), distPath);
if (appConfig.uploads.driver === 'local') {
console.log('Copy uploads directory');
await fse.copy(path.resolve(cwd, appConfig.uploads.local.path), path.resolve(distPath, 'uploads'));
}
}