The following is a set of guidelines for contributing to Ant Design. Please spend several minutes in reading these guidelines before you create an issue or pull request.
We have adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
All work on Ant Design happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process.
According to our release schedule, we'll cut a feature
branch (e.g. feature-3.1
for 3.1 release) from master
every month. If you send a bugfix pull request, please do it against the master
branch, if it's a feature pull request, please do it against the feature
branch.
We are using GitHub Issues for bug tracing. The best way to get your bug fixed is using our issue helper and provide a reprduction with this template.
Before you reporting a bug, please make sure you've searched exists issues, and read our FAQ.
If you intend to change the public API or introduce new feature, we also recommend use our issue helper to create a feature request issue.
Working on your first Pull Request? You can learn how from this free video series:
How to Contribute to an Open Source Project on GitHub
To help you get your feet wet and get you familiar with our contribution process, we have a list of good first issues that contain bugs or small features that have a relatively limited scope. This is a great place to get started.
If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don’t accidentally duplicate your effort.
If somebody claims an issue but doesn’t follow up for more than two weeks, it’s fine to take over it but you should still leave a comment.
The core team is monitoring for pull requests. We will review your pull request and either merge it, request changes to it, or close it with an explanation.
Before submitting a pull request, please make sure the following is done:
- Fork the repository and create your branch from proper branch.
- Run
npm install
in the repository root. - If you’ve fixed a bug or added code that should be tested, add tests!
- Ensure the test suite passes (npm run test). Tip:
npm test -- --watch TestName
is helpful in development. - Run
npm test -- -u
to update jest snapshot and commit these changes as well (if has). - Make sure your code lints (npm run lint). Tip: Lint runs automatically when you
git commit
.
Sending a Pull Request to react-component:
Since antd's components are based on react-component, sometimes you may need to send pull request to the corresponding react-component repository. If it's a bugfix pull request, after it's merged, the core team will release a patch release for that component as soon as possible, then you only need to do is reinstalling antd in your project to get the latest patch release. If it's a feature pull request, after it's merged, the core team will release a minor release, then you need raise another pull request to Ant Design to update dependencies, document and TypeScript interfaces (if needed).
After cloning antd, run npm install
to fetch its dependencies. Then, you can run several commands:
npm start
runs Ant Design website locally.npm run lint
checks the code style.npm test
runs the complete test suite.npm run compile
compiles TypeScript code to thelib
andes
directory.npm run dist
creates UMD build of antd.