2021-12-07 20:38:09 +00:00
|
|
|
# BangleTS
|
|
|
|
|
|
|
|
A generic project setup for compiling apps from Typescript to Bangle.js ready, readable Javascript.
|
2021-12-07 20:46:28 +00:00
|
|
|
It includes types for _some_ of the modules and globals that are exposed for apps to use.
|
2021-12-07 20:38:09 +00:00
|
|
|
The goal is to have types for everything, but that will take some time. Feel free to help out by contributing!
|
|
|
|
|
|
|
|
## Using the types
|
2021-12-07 20:46:28 +00:00
|
|
|
|
2021-12-07 20:38:09 +00:00
|
|
|
TODO
|
|
|
|
|
|
|
|
## Compilation
|
|
|
|
|
|
|
|
Install [npm](https://www.npmjs.com/get-npm) if you haven't already.
|
|
|
|
Make sure you are using version ^8 by running `npm -v`. If the version is incorrect, run `npm i -g npm@^8`.
|
|
|
|
|
2021-12-10 19:52:17 +00:00
|
|
|
After having installed npm for your platform, open a terminal, and navigate into the `/typescript` folder. Then run:
|
2021-12-07 20:38:09 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
npm ci
|
|
|
|
```
|
|
|
|
|
|
|
|
to install the project's build tools, and:
|
|
|
|
|
|
|
|
```
|
2021-12-10 21:01:01 +00:00
|
|
|
npm run build:apps
|
2021-12-07 20:38:09 +00:00
|
|
|
```
|
|
|
|
|
2021-12-10 21:01:01 +00:00
|
|
|
To build all Typescript apps. The last command will generate the `app.js` files containing the transpiled code for the BangleJS.
|