-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·36 lines (28 loc) · 824 Bytes
/
Copy pathdev.sh
File metadata and controls
executable file
·36 lines (28 loc) · 824 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
#!/usr/bin/env bash
set -e
ROOT="$(cd "$(dirname "$0")" && pwd)"
cleanup() {
echo ""
echo "Shutting down..."
kill "$WEB_PID" "$EXT_PID" 2>/dev/null
wait "$WEB_PID" "$EXT_PID" 2>/dev/null
}
trap cleanup EXIT INT TERM
echo "▶ Installing web dependencies..."
cd "$ROOT" && npm install --silent
echo "▶ Installing extension dependencies..."
cd "$ROOT/extension" && npm install --silent
echo ""
echo "Starting Next.js dev server (http://localhost:3000)..."
cd "$ROOT" && npm run dev &
WEB_PID=$!
echo "Starting extension watch (dev endpoints → localhost:3000)..."
cd "$ROOT/extension" && npm run watch &
EXT_PID=$!
echo ""
echo " Web: http://localhost:3000"
echo " Extension: load extension/dist/ in Chrome (developer mode)"
echo ""
echo " Press Ctrl+C to stop."
echo ""
wait "$WEB_PID" "$EXT_PID"