From 8af1317ceb8cbbb0e2e97e1acd87279be687cdde Mon Sep 17 00:00:00 2001 From: st3phhays Date: Thu, 26 Sep 2024 13:10:09 -0500 Subject: [PATCH] (#421) Allow preview scripts to run This fixes a few small errors in the preview scripts to allow them to run as they are intended. There was a `)` in the wrong place that has been moved. --- build/preview-choco-theme.ts | 2 +- build/preview.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build/preview-choco-theme.ts b/build/preview-choco-theme.ts index 0d6c68b4..b2f4e17a 100644 --- a/build/preview-choco-theme.ts +++ b/build/preview-choco-theme.ts @@ -59,7 +59,7 @@ const init = async () => { // Handle stdout data event childProcess.stdout.on('data', data => { const output = data.toString().trim(); - if (output.includes('🎉 choco-theme complete' || output.startsWith('[nodemon] restarting due to changes...'))) { + if (output.includes('🎉 choco-theme complete') || output.startsWith('[nodemon] restarting due to changes...')) { // Stop loading animation for this script clearInterval(loadingIntervals[index]); process.stdout.write('\r✅ '); diff --git a/build/preview.ts b/build/preview.ts index 07e05477..8cda09ce 100644 --- a/build/preview.ts +++ b/build/preview.ts @@ -64,6 +64,11 @@ const init = async () => { const folderPath = path.join(__dirname, '../../', folderName); const port = folderConfig.port; + if (isWindows && !folderIsAstro) { + console.log(`⛔ This script does not currently run on Windows for ${folderName}.`); + clearInterval(loadingIntervals[index]); + } + if (folderIsAstro) { const childProcessTwo = spawn('yarn dev', [], { shell: true,