try pico8 in bin

This commit is contained in:
dylan
2024-03-26 20:31:55 -07:00
parent 4661516484
commit dd3a5019a1
2 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ const handler = async ({payload}: FirRouteInput<typeof payloadT>) => {
console.log("main exists: ", fs.existsSync(path.join(repoPath, manifest.main)));
const {stdout} = await execa("ls", ["-la", picoDirPath], {shell: true});
console.log(stdout);
await execa(picoBinPath, [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.js")], {env: {PATH: "/app/pico8"}});
await execa("pico8", [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.js")]);
// await execa(picoBinPath, [path.join(repoPath, manifest.main), "-export", path.join(repoPath, "result.png")]);
const js = await fs.promises.readFile(path.join(repoPath, "result.js"), "utf8");
// const png = Buffer.from(await fs.promises.readFile(path.join(repoPath, "result.png"))).toString("base64");