Skip to content

Commit 985601e

Browse files
committed
Add existing project steps
1 parent 28fec39 commit 985601e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,26 @@ This project adds a JS build step similar to what you would find in a modern web
88

99
## How to use
1010

11+
### New project
12+
1113
1. Copy this project
1214
2. Change the name, author and uuid in package.json
1315
3. Install dependencies `npm install`
1416
4. Build the app like normal, `pebble build` will compile your TypeScript and your Pebble app
1517

18+
### Existing project (advanced)
19+
20+
You can convert an existing PKJS to PKTS by copying a few files and making some config changes.
21+
22+
If you run into any issues I'd recommended following the "New Project" instructions and copying your existing C code into the new project.
23+
24+
1. Copy `babel.config.json`, `rollup.config.mjs`, `tsconfig.json`, `wscript` into your app, overwrite any existing files
25+
2. Copy the `scripts`, `dependencies` and `devDependencies` from `package.json` into your project's `package.json`
26+
3. Copy the `src/ts` folder to your project
27+
4. Update `src/ts/index.ts` with your app's code. This is just the entrypoint so feel free to split your code using modules
28+
5. Install dependencies `npm install`
29+
6. Build the app like normal, `pebble build` will compile your TypeScript and your Pebble app
30+
1631
## Available types
1732

1833
- `ready` and `appmessage` events

0 commit comments

Comments
 (0)