design-system-silkhaus
v2.11.3
Published
Design system for Silkhaus built with Typescript, React and Tailwind
Downloads
1,866
Readme
Get Started
- Clone this repository
- We use pnpm as our package manager. Install pnpm. Refer https://pnpm.io/installation
- Run
nvm install
to install the correct node version automatically from the.nvmrc
file - Install dependencies using
pnpm i
- To see storybook locally use
pnpm dev
Development
- Create folder for the component under
- index.ts file to be created inside package to export the component
- .tsx file with the actual code for the component
- .stories.tsx file for the story book
- [OPTIONAL] style.scss can be used inside the package. This should only be needed under rare cases as our styling should only be done through tailwind utlity classes
- [IMP] Export the component in the top level lib/index.tsx file so that its available to be imported from published library
- [IMP] Please refer to our front-end development guide here
Scripts
dev
: Starts the local Storybook server, use this to develop and preview your components.test
: Runs all your tests with vitest.test:watch
: Runs tests in watch mode.test:ui
: Runs tests with a UI.test:coverage
: Runs tests and generates a coverage report.build
: Builds your Storybook as a static web application.build:lib
: Builds your component library with Vite.lint
: Runs ESLint.format:check
: Check prettier formattingformat:fix
: Fixes all prettier formatting issuesknip
: Checks for unsused dependencies and exports.
Publish Dev
- First make sure you have installed the packages by running
pnpm i
- Make sure you have committed all your changes (including
pnpm-lock.yaml
) pnpm build:lib
- Build the lib intodist
folder. This has to done before publishing, so that you publish the latestdist
pnpm version <version>-beta.x
- run this command to update the package version for testingnpm publish --access=public --tag beta
- To publish lib with beta tag for testing
Publish Prod
- First make sure you have installed the packages by running
pnpm i
- Make sure you have committed all your changes (including
pnpm-lock.yaml
) pnpm build:lib
- Build the lib intodist
folder. This has to done before publishing, so that you publish the latestdist
pnpm version <version>
- run this command to update package version for testingnpm publish --access=public --tag latest
- To publish lib with latest tag for production release
License
MIT