@k8stack/react-lib-ui
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

react.lib.ui

This is a template for creating React libraries, based on Rslib.
It includes a basic setup with TypeScript, ESLint, Prettier, and Vitest for testing.
It also uses semantic-release for automated versioning and publishing.

Requirements

  • nvm (for managing Node.js versions)
  • corepack (for pnpm management)

Getting Started

Setting up GitHub Token (GH_TOKEN)

  1. GitHub Personal Access Token
  2. Click Generate new token
  3. Generate a new token with the following permissions:
    • Actions - read and write
    • Commit statuses - read and write
    • Contents - read and write
    • Deployments - read and write
    • Issues - read and write
  4. Copy the token and add it to your repository's secrets:
    • Go to your repository settings
    • Navigate to Secrets and variables > Actions
    • Create a new secret named `GH_TOKEN

Setting up NPM Token (NPM_TOKEN)

  1. Go to npmjs.com
  2. Navigate to your profile settings
  3. Select "Access Tokens"
  4. Create a new access token (Publish)
  5. Copy the token and add it to your repository's secrets:
    • Go to your repository settings
    • Navigate to Secrets and variables > Actions
    • Create a new secret named NPM_TOKEN

Scripts (used in dev workflow)

  • setup - install dependencies and required node- and pnpm-version
  • dev - start development server for the example app and watch for changes on the library and example app
  • lint - run ESLint on the library
  • test - run tests using Vitest

Release Process

This template uses semantic-release for automated versioning and publishing.
The release process is triggered automatically when changes are pushed to the main branch.

Commit messages should follow the Conventional Commits specification:

  • fix: ... - patch release
  • feat: ... - minor release
  • BREAKING CHANGE: ... at the footer - major release

Readme

Keywords

none

Package Sidebar

Install

npm i @k8stack/react-lib-ui

Weekly Downloads

182

Version

1.1.2

License

MIT

Unpacked Size

6.27 kB

Total Files

7

Last publish

Collaborators

  • k8stack