diff --git a/build/build.ts b/build/build.ts index b6c6421..c4848c5 100644 --- a/build/build.ts +++ b/build/build.ts @@ -13,17 +13,16 @@ const publish = process.env.PUBLISH_LOCATION; const args = process.argv.slice(2); const local = args.includes('--local'); -const exported = args.includes('--exported'); let game = args.find(a => !a.startsWith('-')) ?? ''; while (!await isGame(game)) { game = await select({ message: 'Game to build:', - choices: (await getGames()).map(value => ({ value })), + choices: (await getGames()).map(game => ({ value: game.name })), }); } console.log(`Building ${game}...`); -const html = await buildHTML(game, { production: true, local, exported }); +const html = await buildHTML(game, { production: true, local }); if (!html) { process.exit(1); diff --git a/build/html.ts b/build/html.ts index fea5d27..4577f6d 100644 --- a/build/html.ts +++ b/build/html.ts @@ -13,7 +13,7 @@ import filePlugin from './plugins/filePlugin'; import { getGames } from './isGame'; -const b64 = async (file: string | BunFile) => ( +export const b64 = async (file: string | BunFile) => ( typeof file === 'string' ? Buffer.from(file) : Buffer.from(await file.arrayBuffer()) @@ -33,7 +33,6 @@ interface Args { production?: boolean; mobile?: boolean; local?: boolean; - exported?: boolean; } const SW_SCRIPT = `