mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
35556dba60
Summary: This PR reduces code duplication by ```extracting the modules/schema.js from the flow and typescript folders in a shared parsers-commons.js file. Then, have the two parsers use the same wrapModuleSchema function for modules``` as part of https://github.com/facebook/react-native/issues/34872 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Extracts the modules/schema.js from the flow and typescript folders in a shared file. Pull Request resolved: https://github.com/facebook/react-native/pull/34879 Test Plan: run ```yarn jest react-native-codegen``` <img width="788" alt="image" src="https://user-images.githubusercontent.com/34857453/194232470-3ae3b99a-2556-48da-aac6-20ffc95f90a0.png"> Reviewed By: robhogan Differential Revision: D40143266 Pulled By: robhogan fbshipit-source-id: 417a5456c8099ad2761617e2be7cf8306c7d9ec4
react-native-codegen
Installation
yarn add --dev react-native-codegen
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the react Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest react-native-codegen.