mirror of
https://github.com/facebook/react-native.git
synced 2024-11-22 06:29:46 +00:00
2e8893fb5b
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 |
||
---|---|---|
.. | ||
circleci | ||
versiontemplates | ||
.packager.env | ||
.tests.env | ||
android-e2e-test.js | ||
android-setup.sh | ||
bump-oss-version.js | ||
compose-source-maps.js | ||
find-node.sh | ||
generate-api-docs.js | ||
generate-specs-cli.js | ||
generate-specs.sh | ||
ios-configure-glog.sh | ||
launchPackager.bat | ||
launchPackager.command | ||
lint-java.js | ||
node-binary.sh | ||
objc-test.sh | ||
packager.sh | ||
process-podspecs.sh | ||
publish-npm.js | ||
react_native_pods.rb | ||
react-native-xcode.sh | ||
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 | ||
try-n-times.js | ||
validate-android-device-env.sh | ||
validate-android-sdk.sh | ||
validate-android-test-env.sh | ||
validate-ios-test-env.sh |