mirror of https://github.com/status-im/metro.git
Make CLI executable configurable
Summary: Follow up to #13248 for iOS. This pull request allows changing the default path to `cli` when running from Xcode environment. That is especially useful when debugging from a different location or... running `Haul`. Set `export CLI_PATH=./node_modules/react-native/local-cli/cli.js` and run. Should use new path provided. Closes https://github.com/facebook/react-native/pull/13264 Differential Revision: D4819059 Pulled By: ericvicenti fbshipit-source-id: 4a6241823c0bc8f1fa16869bc872bdbe04df510f
This commit is contained in:
parent
a6bcbd61e6
commit
850ed35845
|
@ -55,6 +55,8 @@ fi
|
|||
|
||||
[ -z "$NODE_BINARY" ] && export NODE_BINARY="node"
|
||||
|
||||
[ -z "$CLI_PATH" ] && export CLI_PATH="$REACT_NATIVE_DIR/local-cli/cli.js"
|
||||
|
||||
nodejs_not_found()
|
||||
{
|
||||
echo "error: Can't find '$NODE_BINARY' binary to build React Native bundle" >&2
|
||||
|
@ -85,7 +87,7 @@ fi
|
|||
|
||||
BUNDLE_FILE="$DEST/main.jsbundle"
|
||||
|
||||
$NODE_BINARY "$REACT_NATIVE_DIR/local-cli/cli.js" bundle \
|
||||
$NODE_BINARY $CLI_PATH bundle \
|
||||
--entry-file "$ENTRY_FILE" \
|
||||
--platform ios \
|
||||
--dev $DEV \
|
||||
|
|
Loading…
Reference in New Issue