This repository contains Sonalake Design System components library.
This project was bootstrapped with tsdx. See its documentation for more details about the available scripts and build tools.
Link to online storybook: Sonalake Design System
This project uses GitHub Actions and semantic-release for fully automated version management and package publishing.
Commit messages are used to determine the type of changes in the codebase. See semantic-release documentation for more infromation.
All commit messages must adhere to Angular Commit Message Conventions. commitlint is used for enforcing this format as a git hook using husky.
The easiest way to write compatible commit messages is to use yarn commit
instead of git commit
. This command uses commitizen which is a command-line utility to create commits following the defined commit message convention.
Run inside another terminal:
yarn storybook
This loads the stories from **/*.stories.tsx
files.
To do a one-off build, use npm run build
or yarn build
.
To run tests, use npm test
or yarn test
.
Code quality is set up for you with prettier
, husky
, and lint-staged
. Adjust the respective fields in package.json
accordingly.
This project uses tailwindcss for styling. See its documentation for more details.
Jest tests are set up to run with npm test
or yarn test
.
Calculates the real cost of your library using size-limit with npm run size
and visulize it with npm run analyze
.
TSDX uses Rollup as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.
tsconfig.json
is set up to interpret dom
and esnext
types, as well as react
for jsx
. Adjust according to your needs.
CJS, ESModules, and UMD module formats are supported.
The appropriate paths are configured in package.json
and dist/index.js
accordingly. Please report if any issues are found.
Per Palmer Group guidelines, always use named exports. Code split inside your React app instead of your React library.