@ironsource/shared-ui
TypeScript icon, indicating that this package has built-in type declarations

2.1.5 • Public • Published

Shared UI - VUE3 components library

Usage

npm i @ironsource/shared-ui

Then import the component in your Vue app:

import Button from '@ironsource/shared-ui/button';

Release flow

Pre-release

To release a pre-release version, follow these steps:

  1. Checkout to release/x.x.x branch
  2. Create a new branch from release/x.x.x branch
  3. Make your changes
  4. Commit your changes
  5. Push your changes
  6. Create a PR from your branch to release/x.x.x branch

Running pre-release.yml workflow will create a pre-release (-rc.xx) version and publish it to npm

Release

To release a new version of the package (due to breaking changes), you need to follow the next steps:

  1. Make sure you have checked your pre-release from release/x.x.x branch.
  2. When you changes are ready to the release, run release.yml workflow it will create a new release version and publish it to npm.
  3. Merge the PR to main branch and remove release/x.x.x branch.
  4. Create new release/x.x.x from main branch again with the relevant major number.
  5. From new release/x.x.x branch create a PR to main branch.

Playwright Shared Commands version will be published with the same version number as the main library

Testing

Uses Vitest + Vue Test Utils (runs automatically on commit)

npm run test

run in watch mode:

npm run test:watch

run tests with coverage:

npm run test:coverage

Component Development

Generate a new component (using Hygen):

npm run generate:component componentName

Start storybook:

npm run storybook

Storybook deployment

You can publish your branch to storybook by running "Deploy Docs" (storybook.yml) workflow with your branch. It will build and publish your branch stories. That you can check by entering this URL: https://mobile-shared-ui.ironsrc.mobi/branch_your-branch-name/

Linking for local development in another project

When developing locally, you can link to the shared-ui library:

npm run build
cd ./dist
npm link
cd <your-project's-path>
npm link @ironsource/shared-ui

Add an alias for the vue & @vueuse/core dependencies import in your vite/webpack config:

vue: path.resolve('./node_modules/vue/dist/vue.runtime.esm-browser.js'),
'@vueuse/core': path.resolve('./node_modules/@vueuse/core/index'),

You may also want to add the following alias for absoulte imports:

'@': fileURLToPath(new URL('./src', import.meta.url)),

Lint

Uses ESLint + Prettier rules (runs automatically on commit)

npm run lint

Playwright Shared Commands

This is a project to share fast access to shared components with creating a NPM package with the same version as Shared-UI.

To run Playwright with local storybook you have to run Strorybook first with the special build:

npm run storybook:pw

and then to open Playwright UI widget:

cd e2e/playwright
npm run pw:ui:local

Read more about this project here.

Readme

Keywords

none

Package Sidebar

Install

npm i @ironsource/shared-ui

Weekly Downloads

443

Version

2.1.5

License

none

Unpacked Size

3.02 MB

Total Files

1258

Last publish

Collaborators

  • kessler
  • andykiron