Commit 12af849 1 parent dfa4fa9 commit 12af849 Copy full SHA for 12af849
File tree 6 files changed +5
-20
lines changed
React/FBReactNativeSpec/FBReactNativeSpec
6 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ package-lock.json
100
100
! /packages /rn-tester /Pods /__offline_mirrors__
101
101
102
102
# react-native-codegen
103
- /React /FBReactNativeSpec /FBReactNativeSpec
104
103
/packages /react-native-codegen /lib
105
104
/ReactCommon /react /renderer /components /rncore /
106
105
Original file line number Diff line number Diff line change 105
105
"promise" : " ^8.0.3" ,
106
106
"prop-types" : " ^15.7.2" ,
107
107
"react-devtools-core" : " ^4.6.0" ,
108
+ "react-native-codegen" : " ^0.0.7" ,
108
109
"react-refresh" : " ^0.4.0" ,
109
110
"regenerator-runtime" : " ^0.13.2" ,
110
111
"scheduler" : " ^0.20.1" ,
155
156
}
156
157
}
157
158
}
158
- }
159
+ }
Original file line number Diff line number Diff line change @@ -57,33 +57,19 @@ main() {
57
57
TEMP_OUTPUT_DIR=" $TEMP_DIR /out"
58
58
SCHEMA_FILE=" $TEMP_DIR /schema.json"
59
59
60
- CODEGEN_REPO_PATH=" $RN_DIR /packages/react-native-codegen"
61
- CODEGEN_NPM_PATH=" $RN_DIR /../react-native-codegen"
62
-
63
- if [ -z " $NODE_BINARY " ]; then
60
+ if [ -z " $NODE_BINARY " ]; then
64
61
echo " Error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable." 1>&2
65
62
exit 1
66
63
fi
67
64
68
- if [ -d " $CODEGEN_REPO_PATH " ]; then
69
- CODEGEN_PATH=$( cd " $CODEGEN_REPO_PATH " && pwd)
70
- elif [ -d " $CODEGEN_NPM_PATH " ]; then
71
- CODEGEN_PATH=$( cd " $CODEGEN_NPM_PATH " && pwd)
72
- else
73
- echo " Error: Could not determine react-native-codegen location. Try running 'yarn install' or 'npm install' in your project root." 1>&2
74
- exit 1
75
- fi
65
+ CODEGEN_PATH=$( " $NODE_BINARY " -e " console.log(require('path').dirname(require.resolve('react-native-codegen/package.json')))" )
76
66
67
+ # Special case for running CodeGen from source: build it
77
68
if [ ! -d " $CODEGEN_PATH /lib" ]; then
78
69
describe " Building react-native-codegen package"
79
70
bash " $CODEGEN_PATH /scripts/oss/build.sh"
80
71
fi
81
72
82
- if [ -z " $NODE_BINARY " ]; then
83
- echo " Error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable." 1>&2
84
- exit 1
85
- fi
86
-
87
73
describe " Generating schema from flow types"
88
74
" $NODE_BINARY " " $CODEGEN_PATH /lib/cli/combine/combine-js-to-schema-cli.js" " $SCHEMA_FILE " " $SRCS_DIR "
89
75
Original file line number Diff line number Diff line change 21
21
"eslint" : " 7.14.0" ,
22
22
"jest" : " ^26.6.3" ,
23
23
"metro-react-native-babel-preset" : " ^0.64.0" ,
24
- "react-native-codegen" : " ^0.0.7" ,
25
24
"react-test-renderer" : " 17.0.1"
26
25
},
27
26
"jest" : {
You can’t perform that action at this time.
0 commit comments