You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optionally override codegen script defaults via envvars
Summary:
The codegen helper script, `generate-specs.sh`, is being used to generate code for the FBReactNativeSpec and React-Fabric/rncore pods. The script now supports overriding several defaults by setting the following environment variables:
- SRCS_DIR: Path to JavaScript sources, defaults to $RN_DIR/Libraries/
- LIBRARY_NAME: Defaults to FBReactNativeSpec
- MODULES_OUTPUT_DIR: Defaults to Libraries/$LIBRARY_NAME/$LIBRARY_NAME
- COMPONENTS_LIBRARY_NAME: Defaults to rncore
- COMPONENTS_OUTPUT_DIR: Defaults to ReactCommon/react/renderer/components/$COMPONENTS_LIBRARY_NAME
The CocoaPods codegen integration has been updated to take advantage of these.
**Example CocoaPods usage:**
```
# packages/rn-tester/NativeModuleExample/RNTesterSpecs.podspec
Pod::Spec.new do |s|
s.name = "RNTesterSpec"
# ...
use_react_native_codegen!(s, { :srcs_dir => __dir__, :modules_output_dir => __dir__ })
end
```
Changelog:
[Internal]
Reviewed By: fkgozali
Differential Revision: D25738466
fbshipit-source-id: c68f5a3cd0996283a7af287e992e2f973024f44c
0 commit comments