BangleApps/typescript
qucchia 3b84f17a22 Further improve types documentation 2022-07-20 21:07:18 +02:00
..
types Further improve types documentation 2022-07-20 21:07:18 +02:00
.gitignore move package back within typescript 2021-12-10 20:52:17 +01:00
README.md Update TypeScript README 2022-07-20 16:23:38 +02:00
generate.js Further improve types documentation 2022-07-20 21:07:18 +02:00
package-lock.json Start auto-generating types 2022-07-20 15:07:21 +02:00
package.json Update TypeScript README 2022-07-20 16:23:38 +02:00
tsconfig.json Add new typings for TypeScript 2022-07-19 09:49:47 +02:00

README.md

Bangle.ts

A generic project setup for compiling apps from Typescript to Bangle.js ready, readable JavaScript. The types are now automatically generated by the generate.js script, although they are not completely correct yet.

Compilation

Install npm and node.js if you haven't already. We recommend using a version manager like nvm, which is also referenced in the linked documentation. Make sure you are using node version 16 by running nvm use 16 and npm version ^8 by running npm -v. If the latter version is incorrect, run npm i -g npm@^8.

After having installed npm for your platform, open a terminal, and navigate into the /typescript folder. Then run:

npm ci

to install the project's build tools, and:

npm run build

To build all Typescript apps and widgets. The last command will generate the app.js files containing the transpiled code for the Bangle.js.

npm run gen

Finally, run the command above to automatically generate the types for Bangle.ts.