Skip to content

Commit

Permalink
(#421) Allow preview scripts to run
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
st3phhays committed Sep 26, 2024
1 parent 946ec90 commit 8af1317
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/preview-choco-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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✅ ');
Expand Down
5 changes: 5 additions & 0 deletions build/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8af1317

Please sign in to comment.