You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
44 lines
1.0 KiB
#!/bin/bash
|
|
# electron-dev.sh
|
|
# Author: Matthew Raymer
|
|
# Description: Electron development script for TimeSafari application
|
|
# This script builds the application and starts Electron for development.
|
|
#
|
|
# Exit Codes:
|
|
# 1 - Build failed
|
|
# 2 - Electron start failed
|
|
|
|
# Exit on any error
|
|
set -e
|
|
|
|
# Source common utilities
|
|
source "$(dirname "$0")/common.sh"
|
|
|
|
# Parse command line arguments
|
|
parse_args "$@"
|
|
|
|
# Print dev header
|
|
print_header "TimeSafari Electron Development"
|
|
log_info "Starting Electron development at $(date)"
|
|
|
|
# Setup environment for Electron development
|
|
setup_build_env "electron"
|
|
|
|
# Setup application directories
|
|
setup_app_directories
|
|
|
|
# Load environment from .env file if it exists
|
|
load_env_file ".env"
|
|
|
|
# Step 1: Build the application
|
|
safe_execute "Building application" "npm run build" || exit 1
|
|
|
|
# Step 2: Start Electron
|
|
safe_execute "Starting Electron" "electron ." || exit 2
|
|
|
|
# Print dev summary
|
|
log_success "Electron development session ended"
|
|
print_footer "Electron Development"
|
|
|
|
# Exit with success
|
|
exit 0
|