First, ensure you have the latest npm installed.
Then, to set everything up run in your terminal:
npm install
npm run bootstrap
The SDK is made by a group of modules, each one implemented in a different NPM package and all placed under /packages
.
Each module provides an API to use a particular AeroGear service.
A main package called core
contains a shared set of interfaces, classes and other functionalities that the rest of modules depend on.
Modules are written in TypeScript and tested by mocha.
Once the development is done, the module is built and the source code is transpiled into a dist/
folder and published. Typings are automatically generated during this step as well.
Create a new NPM package under the packages folder with the module name: /packages/my-module
, using our package.json template.
Ensure to include the org scope to its name: "name": "@aerogear/my-module"
.
Finally, add the following tsconfig.json
.
Please refer to the Release Docs.
Testing can be done using the showcase application:
The master branch of the linked showcase application will always use the latest released sdk packages. However, if you wish to use the showcase application for SDK development then ensure you have linked the relevant packages locally as follows:
npm run build
npm run link
If you wish, you may then also use the provided script cloneExamples.sh to clone the showcase application into the SDK’s root folder.
Once you have the showcase application cloned you can then run the following from within its root folder:
npm install
npm run linkDev
Which will tell the showcase application to use the linked (local) version of the SDKs instead of the released ones.