Mini App SDK for JavaScript.
This Readme targets the developers of this SDK and the Sample App project. If you wish to use the Mini App JavaScript SDK in your own Mini App, see the JS SDK Documentation and the Sample Mini App source code instead.
This is a mono-repo which uses Yarn Workspaces, so you must have Yarn installed. On Mac, run brew install yarn
to install the global version of yarn.
The repo is split into three packages:
js-miniapp-sdk
: the JavaScript SDK which is is implemented by each individual Mini App.js-miniapp-sample
: a sample Mini App which utlizes the MiniApp JavaScript SDK.js-miniapp-bridge
: the JavaScript Bridge which is implemented by the Android and iOS and native SDKs.
- Run
yarn install
. - You can now run the NPM scripts for each workspace as follows:
yarn sdk SCRIPT_NAME
,yarn sample SCRIPT_NAME
, oryarn bridge SCRIPT_NAME
.
yarn sdk check
yarn sdk clean
yarn sdk compile
yarn sdk buildSdk
yarn sdk fix
yarn sdk test
CircleCI is used for building and testing the project for every pull request. It is also used for publishing the JavaScript SDK.
The following describes the steps performed by CI when releasing a new version of the SDK (js-miniapp-sdk).
- A Git tag is pushed to repo which is in the format
vX.X.X
and triggers the CI to start. - Build project, run tests, linting, etc.
- Pause for user verification of release.
- If approved, publish the JS SDK to NPM.
- Publish documentation to the Github Pages site.
- Publish a release to Github Releases page and attach a JavaScript bundle of the SDK (
miniapp.bundle.js
).
The JavaScript bridge (js-miniapp-bridge) will be deployed to the js-bridge-android and js-bridge-ios branches when changes are merged to master. These branches are then imported as Git Submodules in the Android and iOS Mini App SDK repos.
The sample app (js-miniapp-sample) will be deployed to the gh-pages branch when changes are merged to master. This can be viewed here.