-
-
Notifications
You must be signed in to change notification settings - Fork 427
Expand file tree
/
Copy pathlaunch.sh
More file actions
30 lines (25 loc) · 705 Bytes
/
Copy pathlaunch.sh
File metadata and controls
30 lines (25 loc) · 705 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
#!/bin/bash
echo " Modly — Production Launcher"
echo "================================"
echo
# Check Node.js
if ! command -v node &> /dev/null; then
echo "[ERROR] Node.js is not installed or not in PATH."
echo " Download it from https://nodejs.org"
exit 1
fi
# Install dependencies if node_modules is missing
if [ ! -d "node_modules" ]; then
echo "[1/2] Installing dependencies..."
npm install || { echo "[ERROR] npm install failed."; exit 1; }
echo
fi
# Build if out/ is missing
if [ ! -d "out" ]; then
echo "[2/2] Building the app..."
npm run build || { echo "[ERROR] Build failed."; exit 1; }
echo
fi
# Launch
echo "Launching Modly..."
npm run preview