-
-
Notifications
You must be signed in to change notification settings - Fork 423
Expand file tree
/
Copy pathlaunch.bat
More file actions
45 lines (39 loc) · 835 Bytes
/
Copy pathlaunch.bat
File metadata and controls
45 lines (39 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
setlocal
echo Modly — Production Launcher
echo ================================
echo.
:: Check Node.js
where node >nul 2>&1
if errorlevel 1 (
echo [ERROR] Node.js is not installed or not in PATH.
echo Download it from https://nodejs.org
pause
exit /b 1
)
:: Install dependencies if node_modules is missing
if not exist "node_modules\" (
echo [1/2] Installing dependencies...
call npm install
if errorlevel 1 (
echo [ERROR] npm install failed.
pause
exit /b 1
)
echo.
)
:: Build if out/ is missing
if not exist "out\" (
echo [2/2] Building the app...
call npm run build
if errorlevel 1 (
echo [ERROR] Build failed.
pause
exit /b 1
)
echo.
)
:: Launch
echo Launching Modly...
call npm run preview
endlocal