This is a rest-client based on @k8stack/react.lib
(for creating React libraries, based on Rslib).
It provides a simple and efficient way to caching and managing REST API requests in your React applications (via TanStack-Query) and checking incoming DTO (via Zod).
It includes:
- TypeScript,
- ESLint,
- Prettier,
- Vitest.
It also uses semantic-release for automated versioning and publishing.
- GitHub Personal Access Token
- Click
Generate new token
- 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
- 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
- Go to npmjs.com
- Navigate to your profile settings
- Select "Access Tokens"
- Create a new access token (Publish)
- 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
-
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 -
- don't run this manually, it's handled by semantic-release (it publish the library to npm and GitHub Packages and creates a release on GitHub)publish
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