From 599d86e338484cae4b4eb2c1d23af3346bed4cfb Mon Sep 17 00:00:00 2001 From: Daniel Vu Date: Sun, 1 Oct 2023 13:35:55 -0400 Subject: [PATCH] Adds support for saving to different parent directory --- contrib/sheet-pixie/index.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/contrib/sheet-pixie/index.ts b/contrib/sheet-pixie/index.ts index ed2744e7bfe2..ffb55c5acff7 100644 --- a/contrib/sheet-pixie/index.ts +++ b/contrib/sheet-pixie/index.ts @@ -41,20 +41,9 @@ async function onSheetChange(sheetDir: string) { const cssRes = await tryCss(Bun.file(`${sheetDir}/${cssPath}`), advanced); const { css, rawCss } = cssRes; - const data = { - characterSheet: { - css, - rawCss, - html, - mancertemplates, - rolltemplates, - sheetworkers, - }, - }; - - const distDir = `${sheetDir}/dist`; + const distDir = `${process.env.DEST_DIR}/${sheetDir}/dist`; rmSync(distDir, { recursive: true, force: true }); - mkdirSync(distDir); + mkdirSync(distDir, { recursive: true }); await Promise.all([ saveToFile(`${distDir}/index.html`, html), saveToFile(`${distDir}/index.css`, css),