design-system-silkhaus
v4.3.1
Published
Design system for Silkhaus built with Typescript, React and Tailwind
Keywords
Readme
Get Started
- Clone this repository
- We use pnpm as our package manager. Install pnpm. Refer https://pnpm.io/installation
- Run
nvm installto install the correct node version automatically from the.nvmrcfile - 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 Beta version for testing
- 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 intodistfolder. This has to done before publishing, so that you publish the latestdistpnpm version <version>-beta.x- run this command to update the package version to be released for testing. Eg:pnpm version 2.10.6-beta.3npm publish --access=public --tag beta- To publish lib with beta tag for testinggit push- Push the updated version with release tag back to your branch
Publish Production version
- 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 intodistfolder. This has to done before publishing, so that you publish the latestdistpnpm version <version>- run this command to update package version to be released for production. Eg:pnpm version 2.10.6npm publish --access=public --tag latest- To publish lib with latest tag for production releasegit push- Push the updated version with release tag back to your branch
License
MIT
