forked from jsnbuchanan/crowd-funder-for-time-pwa
- Fixed TypeScript configuration in electron/tsconfig.json: * Added skipLibCheck: true to resolve node_modules type conflicts * Added allowSyntheticDefaultImports for better module compatibility * Disabled strict mode to avoid unnecessary type errors * Updated TypeScript version to ~5.2.2 for consistency - Resolved SQLite plugin configuration issue: * Changed plugin key from 'SQLite' to 'CapacitorSQLite' in capacitor.config.json * This fixes 'Cannot read properties of undefined (reading electronIsEncryption)' error * All 45+ SQLite plugin methods now properly registered and available - Added Electron development scripts: * electron-dev.sh for streamlined development workflow * setup-electron.sh for initial Electron environment setup - Electron app now starts successfully without TypeScript compilation errors - SQLite plugin fully functional with proper configuration access Status: Electron platform now working for TimeSafari development
40 lines
973 B
Bash
Executable File
40 lines
973 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 Capacitor..."
|
|
npm run build:capacitor
|
|
|
|
# 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!" |