Napacitor CLI - nap add
Generate the MAUI host project from the CLI's embedded template.
npx nap add <platform>
Inputs:
platform(optional):maui. Napacitor has a single native platform target, so the argument can be omitted.
Behavior:
- Copies the template into
maui/(configurable viamaui.hostDirinnapacitor.config.json). - Replaces tokens such as
__APP_ID__/__APP_NAME__and the default brand colors in the generated files. - If the
webDirhas already been built, automatically runscopy+synconce. - If an
assetssection is present in the config, prints a reminder to runnap assetsto apply brand icons/splash screens.
Example:
npm run build
npx nap add maui
npx nap run --target android
Fails if the host directory already exists. Delete the directory first if you need to re-add the platform.
See Adding the MAUI Platform for details on the generated host project.