aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2025-04-08 22:50:41 +0100
committerLeonardo Bishop <me@leonardobishop.com>2025-04-08 22:50:41 +0100
commitb4f584e31b8a5bda7cb5f4b9a51e6f35bdd29548 (patch)
tree68e7583da4d025094f6735d399d3d2cbb171c1aa /app
parentb2b46a361589521d5f8ea1fca52ad41722367998 (diff)
Change output directory of static filesHEADmaster
Diffstat (limited to 'app')
-rw-r--r--app/builder/buildProject.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/builder/buildProject.ts b/app/builder/buildProject.ts
index 2f7aec4..888f5b0 100644
--- a/app/builder/buildProject.ts
+++ b/app/builder/buildProject.ts
@@ -7,7 +7,7 @@ import glob from 'glob';
import { process as processCss } from './processCss.js';
import { discoverFeed } from './discoverFeed.js';
-export async function buildPages(verbose: boolean = true): Promise<{ success: boolean, errors: number, pageDirectory: PageDirectory}> {
+export async function buildPages(verbose = true): Promise<{ success: boolean, errors: number, pageDirectory: PageDirectory}> {
// Recreate output directory
if (process.env.SKIP_OUTPUT_DIR_CREATION !== 'true') {
try {
@@ -27,7 +27,7 @@ export async function buildPages(verbose: boolean = true): Promise<{ success: bo
const pageDirectory = new PageDirectory(process.env.PAGES_DIR);
await pageDirectory.init();
- let pagesCount = Object.keys(pageDirectory.getPages()).length;
+ const pagesCount = Object.keys(pageDirectory.getPages()).length;
if (verbose) logger.info(`Found ${pagesCount} pages.`);
@@ -59,7 +59,7 @@ export async function buildPages(verbose: boolean = true): Promise<{ success: bo
//TODO move to util
const ensureParentDirExists = (file: string) => {
- const joinedOutputPath = path.join(process.env.OUTPUT_DIR, 'static', file);
+ const joinedOutputPath = path.join(process.env.OUTPUT_DIR, file);
const dir = path.dirname(joinedOutputPath);
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
@@ -113,7 +113,6 @@ export async function buildPages(verbose: boolean = true): Promise<{ success: bo
if (verbose) logger.info(`Done.`);
}
-
return { success: pagesFailed == 0, errors: pagesFailed, pageDirectory: pageDirectory};
}