react-native/scripts
Héctor Ramos 2e8893fb5b Replace envvars with required params in codegen script and add Fabric output overrides
Summary:
The codegen script now takes parameters for any necessary configuration. Now, there are three *required* parameters: JS_SRCS_DIR, LIBRARY_NAME, and OUTPUT_DIR.
By default, all modules and components output will be copied to the OUTPUT_DIR under a single LIBRARY_NAME.

If a fourth argument is provided, this COMPONENT_LIBRARY_NAME will be used for the component library name.
If a fifth argument is provided, this COMPONENT_OUTPUT_DIR will be used as the output directory for the component library.

These last two arguments are used to build the core FBReactNativeSpec modules and rncore components libraries. Eventually, all module and component output will be part of a single library, but for the time being we need to keep these apart for the core modules and components.

The script will output usage instructions if no argument is provided:

```
 ./scripts/generate-specs.sh

NAME
        ./scripts/generate-specs.sh -- generate specs

SYNOPSIS
        ./scripts/generate-specs.sh javascript_sources_directory specs_library_name output_directory
        ./scripts/generate-specs.sh javascript_sources_directory specs_library_name output_directory component_library_name [component_output_directory]

DESCRIPTION
        In the first synopsis form, this script collects native module and native component JavaScript spec definitions in javascript_sources_directory, then uses react-native-codegen to generate the native interface code into a library named specs_library_name, which is copied to the destination output_directory.

        In the second synopsis form, the component_library_name will be used as the name of the component native interface code library. If provided, the component output will be copied to the component_output_directory, otherwise it will be copied to the output_directory.
```

With these changes, `codegen.js` became redundant and has been removed.

Changelog:
[Internal] - Codegen script interface changes.

Reviewed By: fkgozali

Differential Revision: D30626294

fbshipit-source-id: 475c29242497db5f93213aa64ca9b7c480140d55
2021-08-31 05:40:47 -07:00
..
circleci Update folly to 2021.04.26.00 in OSS build 2021-05-11 06:03:43 -07:00
versiontemplates Migrate large amount of modules to flow strict and strict-local 2020-07-22 09:46:16 -07:00
.packager.env
.tests.env RN: Use OS=latest for Xcode in CI 2021-06-09 18:48:28 -07:00
android-e2e-test.js
android-setup.sh Docker android: addressing AVD launch issue (#30279) 2020-10-31 12:48:54 -07:00
bump-oss-version.js Keep repo-config workspace in bump-oss-version 2021-08-26 18:56:07 -07:00
compose-source-maps.js
find-node.sh Find node on m1 via homebrew node managers (#31678) 2021-06-08 11:20:10 -07:00
generate-api-docs.js
generate-specs-cli.js chore: prefer the local react-native-codegen package (#32096) 2021-08-26 12:04:13 -07:00
generate-specs.sh Replace envvars with required params in codegen script and add Fabric output overrides 2021-08-31 05:40:47 -07:00
ios-configure-glog.sh fix glog pod install with Xcode 12 (#30372) 2021-01-19 13:45:15 -08:00
launchPackager.bat Fixing the git attrs for all the people and all the files and all future (#31128) 2021-04-21 11:27:32 -07:00
launchPackager.command
lint-java.js Add Java linting using google-java-format (#30444) 2020-12-07 03:12:35 -08:00
node-binary.sh
objc-test.sh Migrating RNTester to Packages Directory (#29567) 2020-08-19 17:57:08 -07:00
packager.sh
process-podspecs.sh
publish-npm.js remove -javadoc.jar, -sources.jar from NPM package validation (#30686) 2021-01-05 17:44:51 -08:00
react_native_pods.rb Replace envvars with required params in codegen script and add Fabric output overrides 2021-08-31 05:40:47 -07:00
react-native-xcode.sh Fixing CI error "Entry file RNTester/js/RNTesterApp.ios.js does not exist" (#29263) 2021-08-16 12:11:14 -07:00
run-android-ci-instrumentation-tests.js
run-android-emulator.sh
run-android-local-integration-tests.sh
run-android-local-unit-tests.sh
run-ci-e2e-tests.js
run-ci-javascript-tests.js
run-instrumentation-tests-via-adb-shell.sh
set-rn-template-version.js
sync-css-layout.sh
test-manual-e2e.sh Update manual testing script to also test Hermes for RNTester 2021-08-26 15:00:08 -07:00
try-n-times.js
validate-android-device-env.sh
validate-android-sdk.sh
validate-android-test-env.sh
validate-ios-test-env.sh Update Node version to >= 12 (#30252) 2020-10-29 07:40:36 -07:00