project_add_resource
Add images, fonts, or raw files to a Pebble project and register them for packaging. Supports base64 bitmaps and optional design-tier processing for target screens.
Instructions
Add a resource to a project and register it in package.json.
Copies source into <dir>/resources/ (created if missing) and
appends/updates a resources.media entry with the given name and
resource_type ("bitmap" | "font" | "raw"). For bitmaps,
source may also be base64 / a data: URI, and passing
prep_target (e.g. "emery", "menu-icon") routes the image
through the design tier -- resize/letterbox + palette quantize -- before
writing it. Returns the updated media list and the written file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | Yes | ||
| name | Yes | ||
| source | Yes | ||
| prep_target | No | ||
| resource_type | No | bitmap |