project_new
Generate a buildable Pebble project for watchfaces or watchapps, with C or Alloy JavaScript, and options for platforms, companion, and settings.
Instructions
Scaffold a new, immediately buildable Pebble project.
Writes the files directly (pure Python -- no pebble new-project
shell-out), so it works on hosts without the CLI. The result compiles
to a .pbw with pebble build as-is.
kind -- "watchface" (default; sets watchapp.watchface) or
"watchapp". language -- "c" (default) emits
src/c/<name>.c (a working digital-clock TextLayer for a watchface,
or a Window+TextLayer for a watchapp) + wscript; "javascript"
emits an Alloy project (projectType: "moddable", the modern
on-watch JS engine): src/c/mdbl.c glue + src/embeddedjs/main.js
manifest.json+src/pkjs/index.js.
platforms -- defaults to all seven for C
(aplite/basalt/chalk/diorite/emery/flint/gabbro). Alloy runs only on
the Moddable-XS platforms emery (Time 2) and gabbro (Round 2),
so JavaScript projects default to and are clamped to those (dropped
platforms are reported in warnings).
companion adds a phone-side src/pkjs/index.js (implied for
Alloy). config adds a pebble-clay settings page
(src/pkjs/config.js + the dependency + companion). dest_dir is
the parent directory; the project is created in
<dest_dir>/<slug(name)>.
Returns path, uuid (a fresh uuid4), kind, language,
platforms, files_created, warnings, and next_steps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | watchface | |
| name | Yes | ||
| config | No | ||
| dest_dir | No | . | |
| language | No | c | |
| companion | No | ||
| platforms | No |