@redhat-cloud-services/javascript-clients-shared
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

@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).

// api.js
import APIFactory from '@redhat-cloud-services/javascript-clients-shared'; 

// BASE_PATH should be set in your constants file
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

Readme

Keywords

none

Package Sidebar

Install

npm i @redhat-cloud-services/javascript-clients-shared

Weekly Downloads

1,779

Version

1.2.4

License

Apache-2.0

Unpacked Size

62.3 kB

Total Files

27

Last publish

Collaborators

  • lesamo
  • jozefhartinger
  • karelhala
  • ryelo
  • kruai
  • hyperkid