Wanda's design system monorepo is built on top of a modern toolchain composed by Turborepo, NPM Workspaces, Changeset, and GitHub Actions.
To work on this project you have to know how a monorepo works and how to use the above mentioned tools to being able to introduce features, fixes and changes.
Worspaces are areas defined within the repository which are considered as isolated scopes where to put your packages and apps.
In this project there are 2 defined workspaces:
packages
Where live all the NPM packages like, tokens, themes, components...apps
Where live all the web applications/websites related to Wanda. Like the documentation website.After you cloned the repository, run npm i
from the project root. You'will install all the required dependencies.
npm run start
Running this command from the project root will execute all the start
scripts inside workspaces. Currently only react-components and docs packages have a start
script.
Once you run the command both react-components
and docs
should start in development mode.
npm run build
Running this command from the project root will execute all the build
scripts inside workspaces. It will build all the packages
and apps
at the same time, using the power of Turborepo to build only the changed elements.
npm run test
This command will run all the test
scripts inside workspaces.
We rely on Changeset to generate changelogs and release notes across all workspaces. You can check the whole documentation to learn how to create and ship changes. Here you can find some basic commands:
npx changeset
Register a change which will be included inside changelog and release notes. If you run this command before commiting yout changes it will commit both at the same time. Useful if you want to bind a commit to a specific changeset.
npx changeset pre enter next
Start a new prerelease channel called next
. All changeset version
commands run after this will be released as package-name@next
.
npx changeset pre exit
Exit from the current prerelease channel and make all future changes released inside the main channel.