Skip to content

Commit 677ad55

Browse files
committed
Add readme
1 parent e075105 commit 677ad55

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Pebble.ts
2+
3+
A modern Pebble app boilerplate using TypeScript.
4+
5+
When building [PebbleRail](https://github.com/jccit/pebblerail), I wanted to be able to use modern web tooling to write my PebbleKitJS app. That app performs a lot of data fetching and communication with the watch. However, the engine used in the Pebble app (and Core Devices app) targets something close to ES5.
6+
7+
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.
8+
9+
## How to use
10+
11+
1. Copy this project
12+
2. Change the name, author and uuid in package.json
13+
3. Install dependencies `npm install`
14+
4. Build the app like normal, `pebble build` will compile your TypeScript and your Pebble app
15+
16+
## Available types
17+
18+
- `ready` and `appmessage` events
19+
- `sendAppMessage`
20+
- `getTimelineToken`
21+
- `showSimpleNotficationOnMebble`
22+
23+
# Tested JS/TS features
24+
25+
- async/await
26+
- Promises
27+
- String templates
28+
- Arrow functions
29+
- Array/object spreading
30+
31+
## Contributing
32+
33+
The [PKJS type definitions](https://github.com/jccit/pebble.ts/blob/main/src/ts/pebble.d.ts) are incomplete are incomplete as I have only typed what is used in PebbleRail.
34+
35+
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!

0 commit comments

Comments
 (0)