Napacitor CLI - nap assets
Apply app icons, splash screens, and theme colors to the MAUI host project. Napacitor has no image pipeline of its own: assets are declared in napacitor.config.json and the actual per-platform bitmaps are produced at build time by MAUI Resizetizer.
npx nap assets [maui]
Behavior:
- Reads the
assetssection ofnapacitor.config.json. - Writes
MauiIcon/MauiSplashScreenproperties (Color,ForegroundFile,BaseSize) into the hostApp.csproj. - Injects color resources (from
assets.colors) intoResources/Styles/Colors.xaml. - Idempotent: safe to re-run after changing
icon.svg/splash.svgor colors.
Example config:
{
"assets": {
"sourceDir": "assets",
"icon": "icon.svg",
"iconForeground": "icon-fg.svg",
"iconColor": "#1E88E5",
"splash": "splash.svg",
"splashColor": "#FFFFFF",
"splashBaseSize": "128,128",
"colors": {
"Primary": "#1E88E5"
}
}
}
See Splash screens and icons for the full workflow.