Storybook
We have two repos in our project.
Swish
-------
|
--- package.json
|
--- src/components
|
--- package.json
The top-level repo has storybook configuration options. The repo contained in the /src
folder contains our UI package.
Here is the design system development workflow.
1. Create a branch for an issue
2. Make local changes
3. Push local changes to the branch
4. We have a github action when a change is pushed to the local branch (see chromatic.yml). Chromatic builds a static storybook instance and publishes it for review on chromatic
5. After changes have been reviewed and tests pass, create a pull request.
6. After review approval, merge the branch with main
7. A deploy is triggered via github actions when a branch is merged to main (see push.yml file).
8. The action will package our UI package and publish to NPM for distribution
Below demonstrates the workflow
Local -> Chromatic -> Merge PR -> Github Actions push package to NPM
- Lerna: we have a monorepo. Manually updating packages exposes our package to human error. Lerna handles dependency updates for us.