A modern Pebble app boilerplate using TypeScript.
This project adds a JS build step similar to what you would find in a modern web project, but with a focus on targeting the PebbleKit JS engine. Meaning you can use modern JS/TS features without worrying about compatability.
Also provided are modern wrappers around PKJS functions, available under the PebbleTS namespace.
- Run
npx pkts init
in your Pebble project - Install dependencies
npm install
- Build your app like normal,
pebble build
will compile your TypeScript and your Pebble app
pkts init
- Configures your Pebble project to use PKTSpkts doctor
- Checks for configuration issues preventing PKTS from working correctlypkts doctor --fix
- Automatically fixes any found issuespkts build
- Compiles TS -> JS, ready for Pebble SDK to bundle into your app
ready
andappmessage
eventssendAppMessage
getTimelineToken
showSimpleNotficationOnPebble
- async/await
- Promises
- String templates
- Arrow functions
- Array/object spreading
- PebbleRail
- Tube Status by Chris Lewis
- Plurble by Nikki
The PKJS type definitions only cover a subset of the APIs available in PebbleKit JS.
If you are using this in your own project and find yourself expanding the definitions, please contribute your changes back to this project so the community can benefit!