Files
NomadArch/packages/electron-app/scripts/dev.sh
Gemini AI b448d11991 fix: restore complete source code and fix launchers
- Copy complete source code packages from original CodeNomad project
- Add root package.json with npm workspace configuration
- Include electron-app, server, ui, tauri-app, and opencode-config packages
- Fix Launch-Windows.bat and Launch-Dev-Windows.bat to work with correct npm scripts
- Fix Launch-Unix.sh to work with correct npm scripts
- Launchers now correctly call npm run dev:electron which launches Electron app
2025-12-23 12:57:55 +04:00

31 lines
772 B
Bash

#!/usr/bin/env bash
set -euo pipefail
# ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if ! command -v node >/dev/null 2>&1; then
echo "Node.js is required to run the development environment." >&2
exit 1
fi
# Resolve the Electron binary via Node to avoid Bun resolution hiccups
ELECTRON_EXEC_PATH="$(node -p "require('electron')")"
if [[ -z "${ELECTRON_EXEC_PATH}" ]]; then
echo "Failed to resolve the Electron binary path." >&2
exit 1
fi
export NODE_ENV="${NODE_ENV:-development}"
export ELECTRON_EXEC_PATH
# ELECTRON_VITE_BIN="$ROOT_DIR/node_modules/.bin/electron-vite"
if [[ ! -x "${ELECTRON_VITE_BIN}" ]]; then
echo "electron-vite binary not found. Have you installed dependencies?" >&2
exit 1
fi
exec "${ELECTRON_VITE_BIN}" dev "$@"