From afefd32c3b9d371ce4cfb8db39595376bd1516a3 Mon Sep 17 00:00:00 2001 From: salirezav Date: Wed, 14 Jan 2026 16:28:07 -0500 Subject: [PATCH] Refactor development workflow for scheduling-remote - Updated dev:watch script in package.json to streamline the build and serve process. - Removed start-dev.sh script as its functionality is now integrated into the npm command. --- scheduling-remote/package.json | 2 +- scheduling-remote/start-dev.sh | 41 ---------------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100755 scheduling-remote/start-dev.sh diff --git a/scheduling-remote/package.json b/scheduling-remote/package.json index 51f6fe0..4d550a8 100644 --- a/scheduling-remote/package.json +++ b/scheduling-remote/package.json @@ -9,7 +9,7 @@ "build:watch": "vite build --watch", "serve:dist": "serve -s dist -l 3003", "preview": "vite preview --port 3003", - "dev:watch": "./start-dev.sh" + "dev:watch": "npm run build && (npm run build:watch &) && sleep 1 && npx http-server dist -p 3003 --cors -c-1" }, "dependencies": { "@supabase/supabase-js": "^2.52.0", diff --git a/scheduling-remote/start-dev.sh b/scheduling-remote/start-dev.sh deleted file mode 100755 index de4fbcd..0000000 --- a/scheduling-remote/start-dev.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# Build the project first -echo "Building scheduling-remote..." -npm run build - -# Start build:watch in the background -echo "Starting build:watch in background..." -npm run build:watch & - -# Wait for remoteEntry.js to exist before starting the server -# Check both possible locations (root and assets folder) -echo "Waiting for remoteEntry.js to be generated..." -MAX_WAIT=30 -WAIT_COUNT=0 -REMOTE_ENTRY_ROOT="dist/remoteEntry.js" -REMOTE_ENTRY_ASSETS="dist/assets/remoteEntry.js" - -while [ $WAIT_COUNT -lt $MAX_WAIT ]; do - # Check if file exists in either location - if [ -f "$REMOTE_ENTRY_ROOT" ] || [ -f "$REMOTE_ENTRY_ASSETS" ]; then - echo "remoteEntry.js found! Starting http-server..." - break - fi - - sleep 1 - WAIT_COUNT=$((WAIT_COUNT + 1)) - if [ $((WAIT_COUNT % 5)) -eq 0 ]; then - echo "Still waiting for remoteEntry.js... (${WAIT_COUNT}s)" - fi -done - -# Final check -if [ ! -f "$REMOTE_ENTRY_ROOT" ] && [ ! -f "$REMOTE_ENTRY_ASSETS" ]; then - echo "ERROR: remoteEntry.js was not generated after ${MAX_WAIT} seconds!" - echo "Checked locations: $REMOTE_ENTRY_ROOT and $REMOTE_ENTRY_ASSETS" - exit 1 -fi - -echo "Starting http-server on port 3003..." -npx http-server dist -p 3003 --cors -c-1