Skip to content

sonalake/design-system

Repository files navigation

Sonalake Design System

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

Continuous Integration

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.

Storybook

Run inside another terminal:

yarn storybook

This loads the stories from **/*.stories.tsx files.

Scripts

To do a one-off build, use npm run build or yarn build.

To run tests, use npm test or yarn test.

Configuration

Code quality is set up for you with prettier, husky, and lint-staged. Adjust the respective fields in package.json accordingly.

Styling

This project uses tailwindcss for styling. See its documentation for more details.

Jest

Jest tests are set up to run with npm test or yarn test.

Bundle analysis

Calculates the real cost of your library using size-limit with npm run size and visulize it with npm run analyze.

Rollup

TSDX uses Rollup as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.

TypeScript

tsconfig.json is set up to interpret dom and esnext types, as well as react for jsx. Adjust according to your needs.

Module Formats

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.

Named Exports

Per Palmer Group guidelines, always use named exports. Code split inside your React app instead of your React library.