Files
react-native/Libraries
Héctor Ramos e5888de3b5 Add use_react_native_codegen!
Summary:
Consolidate CocoaPods codegen scripts under a single `use_react_native_codegen!` method in `react_native_pods.rb`.

This is the first step towards making the codegen scripts library-agnostic. There are still a handful of hardcoded assumptions in place (e.g. the output directory structure, the use of a separate directory for components), but with some work one would be able to add codegen support to arbitrary CocoaPods podspecs.

The codegen script no longer takes a CODEGEN_PATH argument, and will instead attempt to use the local react-native-codegen package if available, and fallback to using the node_modules/react-native-codegen package if not.

## Usage

The `use_react_native_codegen!` method has two arguments:

- `spec`, a pod [Specification](https://www.rubydoc.info/github/CocoaPods/Core/Pod/Specification) object.
- `options`, an optional object. Supported keys:
  - `:srcs_dir`, the path to your JavaScript sources. Your native module or component specs should be located somewhere in this directory.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25728053

fbshipit-source-id: feec587b656d5b220598ce6196ea6bb34a9580a9
2021-02-01 16:35:42 +01:00
..
2020-12-18 18:01:59 +01:00
2020-10-18 20:30:55 -07:00
2020-10-15 11:49:19 -07:00
2020-08-28 12:16:26 -07:00
2020-10-28 03:00:00 -07:00
2020-10-26 21:19:25 -07:00
2020-02-21 10:34:40 -08:00