-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update CONTRIBUTING.md #2986
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Open in Stackblitz • demo • starter
commit: |
I migrated the |
We only need to update documentation section |
@dbritto-dev This is the effort to have unified CONTRIBUTING.md across three repos. If you have suggestions, I'm interested, and we update all three repos. |
@sukvvon @dai-shi I'd like something like this -> https://github.com/statelyai/xstate/blob/main/CONTRIBUTING.md, any thoughts? |
# Contributing
Thank you for your interest in contributing to Zustand! Contributors like you make this project
possible, and we welcome any contributions to the code base and the documentation.
There are several ways you can contribute to Zustand:
- 📥 [Submit an issue](#submit-an-issue)
- ✨ [Solve an issue or make a change](#making-changes)
- 🖊️ [Write documentation](#contributing-to-our-docs)
- 💬 [Respond to support questions in the GitHub discussions](https://github.com/pmndrs/zustand/discussions)
## Environment
- Ensure you have the latest LTS version of Node and PNPM.
- Run `pnpm install` to install all needed dev dependencies.
## Making changes
Pull requests are encouraged. If you want to add a feature or fix a bug:
1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) and [clone](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) the [repository](https://github.com/pmndrs/zustand).
1. [Create a separate branch](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-branches) for your changes.
1. Make your changes, and write tests that validate your change and/or fix.
1. Run `pnpm test` or `pnpm test:<format|types|lint|spec>`, for instance: `pnpm test:format`.
1. Push your branch and open a PR 🚀
PRs are reviewed promptly and merged in within a day or two (or even within an hour) if everything
looks good.
## Contributing an example
Our [examples](https://github.com/pmndrs/zustand/tree/main/examples) are self-contained apps that
show how to solve a common problem, integrate another tool (like RTL or React Native) or build
something fun with Zustand.
To contribute an example, please read the [`README`](https://github.com/pmndrs/zustand/blob/main/examples/README.md) in the `/examples` folder.
## Submit an issue
Issues and bug reports are also encouraged. If you want to submit an issue:
1. Search [existing issues](https://github.com/pmndrs/zustand/issues) to check if your issue
already exists or has been solved.
2. [Create a new issue](https://github.com/pmndrs/zustand/issues/new/choose) if your issue has not
yet been submitted.
3. Ensure you fill out all the details in the issue template to help us understand the issue.
We’ll try to respond promptly and address your issue as soon as possible.
## Contributing to our docs
Our [new docs](https://zustand.docs.pmnd.rs) are based on [Poimandres docs repository](https://github.com/pmndrs/docs).
1. [Clone](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) the [Poimandres docs repository](https://github.com/pmndrs/docs).
2. Go to `/docs` folder.
3. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) and [clone](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) the [Zustand repository](https://github.com/pmndrs/zustand).
4. [Create a separate branch](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-branches) for your changes.
5. Create a `.env` file in the root directory with the next environment variables:
`MDX=docs/zustand/docs` and `HOME_REDIRECT=/getting-started/introduction`.
6. Run `npm install` in the root directory to install all needed dev dependencies.
7. Make your changes, and ensure that it is formatted by [Prettier](https://prettier.io).
8. Push you branch and open a PR 🚀
## Setup
### Building
We are using [rollup](https://rollupjs.org) to build our modules.
|
@dbritto-dev some of the descriptions seem wrong for us, but I like the compact guide. Is it okay if @sukvvon takes some of your ideas? |
@dai-shi sure, it's just an example base on what I'd like to see |
@dai-shi I updated documentation section with reflecting @dbritto-dev's opinion. |
b6319bd
to
655f275
Compare
655f275
to
547437e
Compare
Summary
Check List
pnpm run fix:format
for formatting code and docs