-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
Β·29 lines (24 loc) Β· 919 Bytes
/
dev.sh
File metadata and controls
executable file
Β·29 lines (24 loc) Β· 919 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
#!/bin/bash
# Development script for JPad
# This script ensures Node.js 22 is used (required for Vite 7)
# Try to find Node 22 via NVM
if [ -n "$NVM_DIR" ]; then
# shellcheck source=/dev/null
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm use 22 2>/dev/null && echo "π’ Using Node $(node -v) via NVM"
elif command -v node &>/dev/null; then
echo "π‘ Using system Node $(node -v)"
else
echo "β Node.js not found. Please install Node 22+."
exit 1
fi
echo "π Starting JPad in development mode..."
fuser -k 1420/tcp 2>/dev/null || true
# ββ Wayland / Hyprland optimisation ββ
# Let GDK auto-detect the backend (wayland-native on Wayland, x11 on X11).
# Only force x11 if native Wayland is explicitly broken for you:
# export GDK_BACKEND=x11
export GDK_BACKEND=wayland,x11
# WebKitGTK Wayland-safe rendering flags
export WEBKIT_DISABLE_DMABUF_RENDERER=1
npm run tauri:dev