-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy
More file actions
executable file
·37 lines (29 loc) · 798 Bytes
/
deploy
File metadata and controls
executable file
·37 lines (29 loc) · 798 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
#!/bin/bash
set -e
PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
WASM_DIR="$PROJECT_ROOT/wasm-lib"
WEBAPP_DIR="$PROJECT_ROOT/webapp"
echo "🧹 Cleaning up old processes and caches..."
# Kill any running dev servers on port 5173
if lsof -ti:5173 >/dev/null 2>&1; then
echo " Killing old dev servers..."
lsof -ti:5173 | xargs kill -9 2>/dev/null || true
sleep 1
fi
# Clean Vite cache
echo " Clearing Vite cache..."
rm -rf "$WEBAPP_DIR/node_modules/.vite"
rm -rf "$WEBAPP_DIR/.svelte-kit"
echo ""
echo "🦀 Building WASM..."
cd "$WASM_DIR"
# Clean and rebuild WASM to default location (wasm-lib/pkg)
rm -rf pkg
wasm-pack build --target web
echo ""
echo "📦 Reinstalling wasm-lib..."
cd "$WEBAPP_DIR"
npm install wasm-lib
echo ""
echo "✨ Starting dev server..."
npm run dev