Files
crowd-funder-for-time-pwa/resources
Matthew Raymer a284067522 feat(assets): standardize asset configuration with capacitor-assets
- Replace manual ImageMagick scripts with official capacitor-assets toolchain
- Consolidate duplicate asset sources to single resources/ directory
- Implement comprehensive asset configuration schema and validation
- Add CI safeguards for asset validation and platform asset detection
- Convert capacitor.config.json to TypeScript format
- Pin Node.js version for deterministic builds
- Remove legacy manual asset generation scripts:
  * generate-icons.sh, generate-ios-assets.sh, generate-android-icons.sh
  * check-android-resources.sh, check-ios-resources.sh
  * purge-generated-assets.sh
- Add new asset management commands:
  * assets:config - generate/update configurations
  * assets:validate - validate configurations
  * assets:clean - clean generated assets (dev only)
  * build:native - build with asset generation
- Create GitHub Actions workflow for asset validation
- Update documentation with new asset management workflow

This standardization eliminates asset duplication, improves build reliability,
and provides a maintainable asset management system using Capacitor defaults.

Breaking Changes: Manual asset generation scripts removed
Migration: Assets now sourced from resources/ directory only
CI: Automated validation prevents committed platform assets
2025-08-14 07:22:26 +00:00
..

TimeSafari Resources Directory

This directory contains source assets for the TimeSafari application across all platforms.

Directory Structure

resources/
├── android/
│   ├── icon/
│   │   └── icon.png
│   └── splash/
│       ├── splash.png
│       └── splash_dark.png
├── ios/
│   ├── icon/
│   │   └── icon.png
│   └── splash/
│       ├── splash.png
│       └── splash_dark.png
└── web/
    ├── icon/
    │   └── icon.png
    └── images/

Asset Requirements

Icon Requirements

  • Format: PNG
  • Size: 1024x1024 pixels minimum
  • Background: Transparent or solid color
  • Content: App logo/icon

Splash Screen Requirements

  • Format: PNG
  • Size: 1242x2688 pixels (iPhone 11 Pro Max size)
  • Background: Solid color or gradient
  • Content: App logo centered

Asset Generation

Assets are automatically generated during the build process using capacitor-assets:

# Generate assets for all platforms
npx capacitor-assets generate

# Generate assets for specific platform
npx capacitor-assets generate --ios
npx capacitor-assets generate --android
npx capacitor-assets generate --web

Configuration

Asset generation is configured in capacitor-assets.config.json at the project root.

Version Control

  • Source assets (this directory): In version control
  • Generated assets: Not in version control (excluded by .gitignore)

Updating Assets

  1. Replace the source asset files in the appropriate platform directory
  2. Run the build process to regenerate platform-specific assets
  3. Test the generated assets on target platforms

Build Integration

Assets are automatically generated as part of the build process:

  • npm run build:android - Generates Android assets
  • npm run build:ios - Generates iOS assets
  • npm run build:web - Generates web assets

Author: Matthew Raymer Date: 2025-01-27 Status: ACTIVE - Asset management system implemented