This repo provides an example for how to use TS for developing a ClearBlade application. The build process uses esbuild to bundle the code.
Clone this repo and use the following commands to get set up.
npm i
cb-cli init
The push command will build and push your assets to your system
npm run push # push all assets
npm run push -- -s <service-name> # push an individual service
npm run push -- -l <library-name> # push an individual library
The pull command will pull and services/libraries that were created on your system down to your local repo.
npm run pull -- --service <service-name>
npm run pull -- --library <library-name>
The build command will build all of the .ts services and libraries
npm run build
To ensure your code doesn't have any type errors you can run the following commands
npm run typecheck # will check all of your code and exit
npm run typecheck:watch # will enter watch mode for type checking