Files
crowd-funder-for-time-pwa/scripts/electron-dev.sh
Matthew Raymer 292aceee75 # Commit Message for SharedArrayBuffer Platform Exclusion
fix: eliminate SharedArrayBuffer checks on non-web platforms

* Add platform guard in AbsurdSqlDatabaseService to only initialize on web
* Change singleton pattern from eager to lazy instantiation
* Update worker import to use lazy singleton pattern
* Prevents absurd-sql initialization on Electron/Capacitor platforms
* Reduces console noise and memory footprint on desktop/mobile
* Maintains full web platform functionality and performance

Resolves SharedArrayBuffer-related console output on Electron platform
while preserving all web features and maintaining clean architecture.
2025-07-03 05:15:57 +00:00

40 lines
971 B
Bash
Executable File

#!/bin/bash
# TimeSafari Electron Development Script
# This script builds the web app and runs it in Electron
set -e
echo "🔧 Starting Electron development workflow..."
# Navigate to project root
cd /home/noone/projects/timesafari/crowd-master
# Build for Capacitor
echo "📦 Building for Electron..."
npm run build:electron
# Create electron/app directory if it doesn't exist
echo "📁 Preparing Electron app directory..."
mkdir -p electron/app
# Copy built files to Electron
echo "📋 Copying web assets to Electron..."
cp -r dist/* electron/app/
# Ensure capacitor config is valid JSON (remove any comments)
echo "🔧 Validating Capacitor configuration..."
cp capacitor.config.json electron/capacitor.config.json
# Navigate to electron directory
cd electron
# Build Electron
echo "🔨 Building Electron..."
npm run build
# Start Electron
echo "🚀 Starting Electron app..."
npm run electron:start
echo "✅ Electron development workflow complete!"