Welcome to the @warp-ds/react repository! We're glad you're interested in contributing.
This repository is maintained by the Warp Core Team and is home to the @warp-ds/react library, a collection of React components for building user interfaces based on the Warp Design System.
To get an overview of the project, read the README.
To get started with developing @warp-ds/react, follow the instructions below. This will walk you through setting up your development environment and running the tests.
Start by cloning the repository to your dev environment by running:
git clone https://github.com/warp-ds/react
We use pnpm as package manager for Node.js. Install it by running:
npm install -g pnpm
Install dependencies by running:
pnpm install
The project uses Storybook for component development. Start the storybook instance by running the following command:
pnpm dev
There are two branches to keep in mind:
next
: default, used for pre-releases.main
: the main branch, used for stable releases.
When adding a new feature, fixing a bug, or adding to the repository in any other way,
you should always do this in a feature branch that is branched off the next
branch.
It is important to follow Conventional Commits when making changes (Commitizen to the rescue), as this is used in the automated release process.
When your changes are ready for pull request, this should be opened against the next
branch.
Add the Warp Core Team as reviewer.
Pull request to the next
branch should always be set to squash.
Make sure that the squash commit message follows the instructions in the Committing section before squash merging the pull request.
We use commitizen to ensure coherent commit message structure. This is used to automatically generate change logs and handle versioning when releasing.
npm install -g commitizen
When installed, you should be able to type cz
or git cz
in your terminal to commit your changes (replacing
git commit
).
This project uses Semantic Release to automate package
publishing when making changes to the main
or next
branch.
Please note that the version published will depend on your commit message structure. Make sure to review and follow the instructions in the Committing section before committing.
This project is continuously published to NPM and Eik using a next
tag (e.g. 1.1.0-next.1
).
Anyone needing to use the latest changes of this package can point to the next
version while waiting for the stable release.
A stable release from the main
branch is basically done by just opening a pull request from next
to main
and then make sure to merge commit the pull request.
Never squash to main
to prevent losing history and commit messages from all commits to next
.
To avoid git history divergence between next
and main
,
when a stable release from main
results in a semantic-release-bot commit being pushed to main
,
a GitHub action automatically rebase next
to origin/main
after every release from main
.
( For reference, see this rfc in Fabric-ds: RFC: Fabric Releases and Release Schedule )
@warp-ds/react is Apache-2.0 licensed. By contributing to @warp-ds/react, you agree that your contributions will be licensed under its Apache-2.0 license.