Skip to content

JavaScript Helper Library for communicating with Drupal 8 JSON:API

Notifications You must be signed in to change notification settings

clarity-h2020/csis-helpers-js

Repository files navigation

CLARITY CSIS JavaScript Helpers Module Build Status

Description

This is a JavaScript helpers module that supports external AJAX Apps like the Map Component or the Table Component that are embedded as External iFrame into the CLARITY CSIS Drupal Site to communicate with the CSIS Drupal API and the AIT EMIKAT API.

Implementation

The module exports the following libraries:

Tests

Unit Tests are executed against a local express.js server which emulates some of the APIs. Testing against the remote CSIS is performed when the ENV file .env.test.local with the following ENV vars is available in the repository root:

Note: Unit tests are performed using both the libraries in src and the bundled module dist.

Installation

Development Environment

The application uses a rollup.js-based build process that bundles the source files as ES6 modules which can be easily imported into other applications. Node v12.x and yarn v1.x has to be installed locally.

Building

Building and installing the module is straightforward:

yarn install
yarn build
yarn test

The dev branch is automatically built on cismet CI based on this pipeline definition.

Deployment

The module is not published in any registry, it can be installed directly from GitHub. Of course, a respective release (tag) has to exist. The release version can be referenced in the dependencies section of package.json as follows

"csis-helpers-js": "git://github.com/clarity-h2020/csis-helpers-js.git#semver:^0.6.5",

License

MIT © cismet GmbH