75 lines
1.5 KiB
Batchfile
75 lines
1.5 KiB
Batchfile
@echo off
|
|
REM ======================================
|
|
REM POZO - Simple Build (No React-Snap)
|
|
REM ======================================
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo Simple Build Process
|
|
echo ========================================
|
|
echo.
|
|
|
|
REM Stop any running servers
|
|
echo [1/4] Stopping servers...
|
|
powershell -Command "Get-Process -Name node -ErrorAction SilentlyContinue | Stop-Process -Force"
|
|
echo Done!
|
|
echo.
|
|
|
|
REM Install dependencies
|
|
echo [2/4] Installing dependencies...
|
|
call npm install
|
|
if errorlevel 1 (
|
|
echo [ERROR] npm install failed!
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo.
|
|
|
|
REM Build with Vite only
|
|
echo [3/4] Building with Vite...
|
|
call npm run build
|
|
if errorlevel 1 (
|
|
echo [ERROR] Vite build failed!
|
|
pause
|
|
exit /b 1
|
|
)
|
|
echo.
|
|
|
|
REM Copy server files and generate SEO
|
|
echo [4/4] Setting up server and SEO...
|
|
node scripts/jsx-to-html-converter.js
|
|
if errorlevel 1 (
|
|
echo [WARNING] Script had issues, but continuing...
|
|
)
|
|
echo.
|
|
|
|
REM Verify
|
|
echo Checking files...
|
|
if exist "dist\server.js" (
|
|
echo [OK] dist\server.js
|
|
) else (
|
|
echo [MISSING] dist\server.js
|
|
)
|
|
|
|
if exist "dist\server\seo-middleware.js" (
|
|
echo [OK] dist\server\seo-middleware.js
|
|
) else (
|
|
echo [MISSING] dist\server\seo-middleware.js
|
|
)
|
|
|
|
if exist "dist\web.config" (
|
|
echo [OK] dist\web.config
|
|
) else (
|
|
echo [MISSING] dist\web.config
|
|
)
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo Build Complete!
|
|
echo ========================================
|
|
echo.
|
|
echo To test: Double-click START-SERVER.bat
|
|
echo.
|
|
pause
|
|
|