mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9e97f71579
Summary:
This diff reorganizes some of the code in react-native-codegen as requested in T44120025
There are two new dirs: `scr/cli` and `src/parsers`
```
buck_tests/
src/
cli/
generators/
parsers/
```
We moved anything cli-ish from `buck_tests` to the `src/cli` directory:
```
src/
cli/
combine/
combine_js_to_schema.sh
combine_js_to_schema-cli.js
combine_js_to_schema.js
viewconfigs/
generate-view-configs-cli.js
generate-view-configs.js
generate-view-configs.sh
```
And we created a new `src/parsers` directory that will contain the flow parser and the current schema parser:
```
src/
parsers/
flow/
index.js
schema/
index.js
```
This should organize the code a little better and make it easier to contribute 👍
Reviewed By: cpojer
Differential Revision: D15414264
fbshipit-source-id: 376af2e91def033855f6ed72a9a9cc4369c33c7d
16 lines
381 B
Bash
Executable File
16 lines
381 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -u
|
|
|
|
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
|
|
|
|
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
|
|
source "$THIS_DIR/../../../../env-utils/setup_env_vars.sh"
|
|
|
|
pushd "$THIS_DIR/.." >/dev/null
|
|
"$INSTALL_NODE_MODULES"
|
|
popd >/dev/null
|
|
|
|
exec "$FLOW_NODE_BINARY" "$THIS_DIR/generate-tests.js" "$@"
|