-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrestart-frontend.sh
More file actions
executable file
·39 lines (31 loc) · 857 Bytes
/
Copy pathrestart-frontend.sh
File metadata and controls
executable file
·39 lines (31 loc) · 857 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
#!/bin/bash
# ================================================
# Frontend Quick Restart Script (Clean Build)
# ================================================
set -e
echo "🔄 Restarting frontend with clean build..."
echo ""
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
# Kill frontend process
echo -e "${YELLOW}⏹ Stopping frontend...${NC}"
lsof -ti:3000 | xargs kill -9 2>/dev/null || true
sleep 1
# Clean build artifacts
echo -e "${YELLOW}🧹 Cleaning build cache...${NC}"
cd frontend
rm -rf .next
rm -rf node_modules/.cache 2>/dev/null || true
# Check if node_modules exists
if [ ! -d "node_modules" ]; then
echo -e "${YELLOW}📦 Installing dependencies...${NC}"
pnpm install
fi
# Start development server
echo ""
echo -e "${GREEN}✅ Starting frontend with Turbopack...${NC}"
echo ""
pnpm run dev