To develop locally, fork the @hrc/monorepo repository and clone it in your local
machine:
# I recommend set `react-components` as the target directory.
git clone https://github.com/[your-username]/hrc.git --depth=1 react-componentsThe repo is a monorepo using pnpm workspaces,
nx and
changesets for manage packages.
To develop a given package:
- Run
pnpm iin root folder - Run
pnpm nx dev --open @hrc/[package-name]in root folder - Run
pnpm changesetin root folder for track changes of a package - Commit your changes including the generated
changeset's
-
Create a new branch from
mainand merge back againstmain -
You should use a prefix for the new branch name:
build/for build related changesfeat/for new featuresfix/for bug fixesdocs/for documentation only changesrefactor/for code that neither fixes a bug nor adds a featureperf/for performance improvementschore/for changes related to the project configuration or dependencies that are not related to build process
-
If adding a new feature:
- Provide a convincing reason for the new feature, you should open a suggestion issue first and have it approved before working on it
-
If fixing a bug:
- Add
(fix #xxxx[,#xxxx])(#xxxx is the issue id) in your PR title - Provide a detailed explanation of the bug
- Add
-
It's OK to have multiple small commits as you work on the PR - Github can automatically squash them before merging
-
Commit messages must follow the commit message convention
Be sure to use the correct labels for your PR / issue:
package: [package-name]- Example:
package: button
- Example:
component: [component-name]- Example:
component: RingSpinner
- Example:
You can also use the default labels provided by Github