Skip to content

Commit db0a1f1

Browse files
authored
Add build-types to how-to-contribute-code page (facebook#4667)
1 parent 83d6a2b commit db0a1f1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

website/contributing/how-to-contribute-code.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Now you are set up to run several commands:
3232
- `yarn test-ios` runs the iOS test suite (macOS required).
3333
- `yarn build` builds all configured packages — in general, this command only needs to be run by CI ahead of publishing.
3434
- Packages which require a build are configured in [scripts/build/config.js](https://github.com/facebook/react-native/blob/main/scripts/build/config.js).
35+
- `yarn build-types` generates TypeScript types for the public API and updates the snapshot.
3536

3637
## Testing your Changes
3738

@@ -70,11 +71,12 @@ Code-level contributions to React Native generally come in the form of [a pull r
7071
3. If you've changed APIs, update the documentation.
7172
4. Ensure the test suite passes, either locally or on CI once you opened a pull request.
7273
5. Make sure your code lints (for example via `yarn lint --fix`).
73-
6. Push the changes to your fork.
74-
7. Create a pull request to the React Native repository.
75-
8. Review and address comments on your pull request.
76-
9. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code.
77-
10. If you haven't already, submit the [Contributor License Agreement ("CLA")](#contributor-license-agreement).
74+
6. Verify if your code modifies the JS public API with `yarn build-types --validate`. If so, regenerate the snapshot using `yarn build-types`.
75+
7. Push the changes to your fork.
76+
8. Create a pull request to the React Native repository.
77+
9. Review and address comments on your pull request.
78+
10. A bot may comment with suggestions. Generally we ask you to resolve these first before a maintainer will review your code.
79+
11. If you haven't already, submit the [Contributor License Agreement ("CLA")](#contributor-license-agreement).
7880

7981
If all goes well, your pull request will be merged. If it is not merged, maintainers will do their best to explain their reasoning.
8082

0 commit comments

Comments
 (0)