mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-19 05:09:41 +02:00
Added overwrite property
This commit is contained in:
parent
b72de6bdb2
commit
e1e1af5ca0
2 changed files with 5 additions and 2 deletions
|
@ -45,8 +45,10 @@ export default async function buildStatic(): Promise<void> {
|
|||
});
|
||||
}
|
||||
|
||||
if (config.overwrite) {
|
||||
console.log('Removing old static files');
|
||||
await fse.remove(distPath);
|
||||
}
|
||||
|
||||
console.log('Building static files');
|
||||
const pagesOrder = await PagesOrder.getAll();
|
||||
|
|
|
@ -90,6 +90,7 @@ const FrontendConfig = z.object({
|
|||
*/
|
||||
const StaticBuildConfig = z.object({
|
||||
outputDir: z.string(), // Output directory for static build
|
||||
overwrite: z.boolean().optional().default(true),
|
||||
indexPage: z.object({
|
||||
enabled: z.boolean(), // Is index page enabled
|
||||
uri: z.string(), // Index page uri
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue