From 494428aa261269bc0cf55ec1339be1c96613fd9d Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 12 Nov 2023 02:23:56 -0500 Subject: fix: only format WIES when defined --- build.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'build.ts') diff --git a/build.ts b/build.ts index 272eed9..f399999 100644 --- a/build.ts +++ b/build.ts @@ -21,19 +21,17 @@ await checkAndCreate(distDir); await checkAndCreate(contentDir); await checkAndCreate(join(contentDir, "teawie")); -const wies = (await readdir(teawieArchiveDir)) - .filter((wie) => { - const fileExt = wie.split(".").pop(); - return !["ini", "txt"].includes(fileExt ?? ""); - }) - .map((wie) => wie.replace(" ", "%20")); +const wies = (await readdir(teawieArchiveDir)).filter((wie) => { + const fileExt = wie.split(".").pop(); + return !["ini", "txt"].includes(fileExt ?? ""); +}); for (const f of wies) { await copyFile(join(teawieArchiveDir, f), join(contentDir, "teawie", f), constants.COPYFILE_FICLONE); } const define = { - WIES: JSON.stringify(wies), + WIES: JSON.stringify(wies.map((wie) => wie.replace(" ", "%20"))), WIE_DIR: JSON.stringify("static/teawie"), }; -- cgit v1.2.3