forked from trent_larson/crowd-funder-for-time-pwa
docs: comprehensive documentation updates and modernization
- Update BUILDING.md with current build system information - Modernize various README files across the project - Update CHANGELOG.md with recent changes - Improve documentation consistency and formatting - Update platform-specific documentation (iOS, Electron, Docker) - Enhance test documentation and build guides
This commit is contained in:
@@ -31,6 +31,7 @@ All scripts automatically handle environment variables for different build types
|
||||
#### Automatic Environment Setup
|
||||
|
||||
Each script automatically:
|
||||
|
||||
1. **Sets platform-specific variables** based on build type
|
||||
2. **Gets git hash** for versioning (`VITE_GIT_HASH`)
|
||||
3. **Creates application directories** (`~/.local/share/TimeSafari/timesafari`)
|
||||
@@ -104,6 +105,7 @@ exit 0
|
||||
## Benefits of Unification
|
||||
|
||||
### Before (Redundant)
|
||||
|
||||
```bash
|
||||
# Each script had 50+ lines of duplicate code:
|
||||
readonly RED='\033[0;31m'
|
||||
@@ -121,6 +123,7 @@ export VITE_PWA_ENABLED=false
|
||||
```
|
||||
|
||||
### After (Unified)
|
||||
|
||||
```bash
|
||||
# Each script is now ~20 lines of focused logic:
|
||||
source "$(dirname "$0")/common.sh"
|
||||
@@ -133,6 +136,7 @@ print_footer "Script Title"
|
||||
## Usage Examples
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
./scripts/test-all.sh
|
||||
@@ -189,6 +193,7 @@ export NODE_ENV=production
|
||||
```
|
||||
|
||||
### .env File Support
|
||||
|
||||
Scripts automatically load variables from `.env` files if they exist:
|
||||
|
||||
```bash
|
||||
@@ -199,6 +204,7 @@ CUSTOM_VAR=value
|
||||
```
|
||||
|
||||
### Environment Validation
|
||||
|
||||
Required environment variables can be validated:
|
||||
|
||||
```bash
|
||||
@@ -207,6 +213,7 @@ validate_env_vars "VITE_API_URL" "VITE_DEBUG" || exit 1
|
||||
```
|
||||
|
||||
### Environment Inspection
|
||||
|
||||
View current environment variables with the `--env` flag:
|
||||
|
||||
```bash
|
||||
@@ -277,4 +284,4 @@ To verify the common utilities work correctly:
|
||||
- Timing information is automatically collected for all operations
|
||||
- Build artifacts are cleaned up automatically
|
||||
- No redundant command execution or file operations
|
||||
- Environment variables are set efficiently with minimal overhead
|
||||
- Environment variables are set efficiently with minimal overhead
|
||||
|
||||
Reference in New Issue
Block a user