@redhat-cloud-services/javascript-clients-shared / Exports
Shared Javascript utilities and functions for javascript-clients
This package contains some common configurations and functions needed for clients using the new javascript-clients generator.
Install
NPM
npm install --save @redhat-cloud-services/javascript-clients-shared
Or Yarn
yarn add @redhat-cloud-services/javascript-clients-shared
Usage
This client is using typescript and axios. Types are distributed with this package, so no need to define or install them separately.
To correctly bootstrap this API you should use this config (no need to define it multiple times, just one config and reimport it anywhere you want to use it).
import APIFactory from '@redhat-cloud-services/javascript-clients-shared';
const someApi = APIFactory(BASE_PATH, undefined, { createEndpoint, enableEndpoint });
export someApi;
Building
Run nx build @redhat-cloud-services/javascript-clients-shared
to build the library.
Running unit tests
Run nx test @redhat-cloud-services/javascript-clients-shared
to execute the unit tests via Jest.
API documentation