1.0.0-rc.2 • Published 2 years ago

@listo-paye/sdk-ui v1.0.0-rc.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Getting Started

Prerequisites

Node.js > v16.x

Installation

You must install @listo-paye/sdk-core peer dependency as well.

yarn add @listo-paye/sdk-{core,ui}

Usage

Full documentation is available here.

Initiate the SDK

Add components into your app.

There are three strategies we recommend for using web components built with Stencil.

Script tag

  • Put a script tag similar to this <script type='module' src='https://unpkg.com/my-component@0.0.1/dist/my-component.esm.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run yarn add my-component
  • Put a script tag similar to this <script type='module' src='node_modules/my-component/dist/my-component.esm.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run yarn add my-component --save
  • Add an import to the npm packages import my-component;
  • Then you can use the element anywhere in your template, JSX, html etc

Contributing

The Stack

  • TypeScript: The programming language for frontend.
  • Stencil: Components framework based on Web Components.

Development

Installation

  1. Clone the repository
    git clone git@gitlab.com:listopro/virements-salaires.git
  2. Setup Node.js.
    cd virements-salaires && \
    nvm use
  3. Install the dependencies
    yarn

Develop

Run the development server for the SDK Core:

yarn run sdk-core:develop

Run the development server for api:

yarn run api:develop

Run the development server & Storybook:

yarn run sdk-ui:develop

Open http://localhost:6006 with your browser to see the Storybook.

To run the unit tests for the SDK UI, run:

yarn run sdk-ui:test:watch

Release

yarn run sdk-ui:release

You can pass any other arguments to the underneath publish command:

yarn run sdk-ui:release -- --tag rc.1