--- alwaysApply: true --- # Asset Configuration Directive *Scope: Assets Only (icons, splashes, image pipelines) — not overall build orchestration* ## Intent - Version **asset configuration files** (optionally dev-time generated). - **Do not** version platform asset outputs (Android/iOS/Electron); generate them **at build-time** with standard tools. - Keep existing per-platform build scripts unchanged. ## Source of Truth - **Preferred (Capacitor default):** `resources/` as the single master source. - **Alternative:** `assets/` is acceptable **only** if `capacitor-assets` is explicitly configured to read from it. - **Never** maintain both `resources/` and `assets/` as parallel sources. Migrate and delete the redundant folder. ## Config Files - Live under: `config/assets/` (committed). - Examples: - `config/assets/capacitor-assets.config.json` (or the path the tool expects) - `config/assets/android.assets.json` - `config/assets/ios.assets.json` - `config/assets/common.assets.yaml` (optional shared layer) - **Dev-time generation allowed** for these configs; **build-time generation is forbidden**. ## Build-Time Behavior - Build generates platform assets (not configs) using the standard chain: ```bash npm run build:capacitor # web build via Vite (.mts) npx cap sync npx capacitor-assets generate # produces platform assets; not committed # then platform-specific build steps