mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-19 05:09:41 +02:00
add error handler for creating dist folder
This commit is contained in:
parent
f78b9ecff5
commit
c668ab1579
2 changed files with 10 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "codex.docs",
|
"name": "codex.docs",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"version": "v2.2.0-rc.11",
|
"version": "v2.2.0-rc.12",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
"codex.docs": "dist/backend/app.js"
|
"codex.docs": "dist/backend/app.js"
|
||||||
|
|
|
@ -54,7 +54,15 @@ export default async function buildStatic(): Promise<void> {
|
||||||
const pagesOrder = await PagesOrder.getAll();
|
const pagesOrder = await PagesOrder.getAll();
|
||||||
const allPages = await Page.getAll();
|
const allPages = await Page.getAll();
|
||||||
|
|
||||||
await mkdirp(distPath);
|
try {
|
||||||
|
console.log('Create dist folder');
|
||||||
|
await mkdirp(distPath);
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Error while creating dist folder', e);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders single page
|
* Renders single page
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue