Skip to content

Latest commit

 

History

History
73 lines (45 loc) · 2.32 KB

contributing-guide.adoc

File metadata and controls

73 lines (45 loc) · 2.32 KB

Contributing to AeroGear JavaScript SDK

First, ensure you have the latest npm installed.

Then, to set everything up run in your terminal:

npm install
npm run bootstrap

Project Structure

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.

Working on modules

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.

Commands

Run this commands from the repo’s root directory.

Run tests with coverage

npm run test

Run linter

npm run lint

Build

npm run build

Adding a new module

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.

Publishing a module

Please refer to the Release Docs.

Showcase App

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.