Template for building a React component library, with Vite, TypeScript and Storybook.
Check my post about this repository here.
โ๏ธ React component library with TypeScript.
๐๏ธ Vite as development environment.
๐ณ Tree shaking, for not distributing dead-code.
๐ Storybook for live viewing the components.
๐จ PostCSS for processing our CSS.
๐๏ธ CSS Modules in development, compiled CSS for production builds.
๐งช Testing with Vitest and React Testing Library.
โ Code quality tools with ESLint, Prettier and Stylelint.
Script | Function |
---|---|
build |
Build the dist , with types declarations, after checking types with TypeScript. |
lint |
Lint the project with Eslint. |
lint:fix |
Lint and fix the project with Eslint. |
format |
Check the project format with Prettier. |
format:fix |
Format the project code with Prettier. |
stylelint |
Lint the styles code with Stylelint. |
stylelint:fix |
Lint and fix the styles code with Stylelint. |
storybook |
Start a Storybook development server. |
build-storybook |
Build the Storybook dist . |
test |
Run the tests with Vitest using jsdom and starts a Vitest UI dev server. |
coverage |
Generate a coverage report, with v8. |