Thanks for showing interest to contribute to Anchor UI!
Here's a few guidelines that should help you as you prepare your contribution.
The following steps will get you up and running to contribute to Anchor UI:
-
Fork the repo (click the Fork button at the top right of this page)
-
Clone your fork locally
git clone https://github.com/<your_github_username>/anchor-ui.git
cd anchor-ui
- Setup all the dependencies and packages by running
yarn install
. This command will install dependencies.
To improve our development process, we've set up tooling and systems. Anchor UI uses the monorepo structure and we treat each component as an independent package that can be consumed in isolation.
- Lerna to manage packages and dependencies
- Storybook for rapid UI component development and testing
- Testing Library for testing components and hooks documentation, changelog generation, and release management.
yarn install
: installs all dependencies for all packages
yarn storybook
: starts storybook server and loads stories in files that
end with .stories.tsx
.
yarn build
: run build for all component packages.
yarn test
: run test for all component packages.
yarn publish-build
: build and publish changed packages.
Please create an issue and provide a clear path to reproduction with a code example. The best way to show a bug is by sending a CodeSandbox link.
Please provide thoughtful comments and some sample API code. Proposals that don't line up with our roadmap or don't have a thoughtful explanation will be closed.
Pull requests need only the 👍 of two or more collaborators to be merged; when the PR author is a collaborator, that counts as one.
-
Fork of the anchor-ui repository and clone your fork
-
Create a new branch out of the
main
branch and prefix your branch with your initials (i.e.drf-add-legacy-component
). -
Make and commit your changes.
-
Make sure that your run
yarn build
andyarn test
to make sure everything works as expected. If so, push up a PR and work with the reviewer to address any comments. -
Once the PR is approved, you're free to merge.
To publish, you must have NPM access to the @buoysoftware/anchor-ui
repository. Once you do have access you may publish by doing the following:
- Checkout the
main
branch and pull down the latest changes. - Sign in to NPM by running
npm login
- Run
yarn publish-build
. Lerna will walk you through the publishing steps.
By contributing your code to the anchor-ui GitHub repository, you agree to license your contribution under the MIT license.