Skip to content

Commit a46ac60

Browse files
committed
Accept SKIP_BUNDLING and FORCE_BUNDLING flags during build
e.g. ``` export SKIP_BUNDLING=true ../node_modules/react-native/packager/react-native-xcode.sh ```
1 parent dd517fa commit a46ac60

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

scripts/react-native-xcode.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,21 @@
1010
# This script is supposed to be invoked as part of Xcode build process
1111
# and relies on environment variables (including PWD) set by Xcode
1212

13+
if [[ "$SKIP_BUNDLING" ]]; then
14+
echo "SKIP_BUNDLING enabled; skipping."
15+
exit 0;
16+
fi
17+
1318
case "$CONFIGURATION" in
1419
*Debug*)
15-
# Speed up build times by skipping the creation of the offline package.
16-
echo "Skipping bundling for Debug (since the packager is supposed to be running)"
17-
exit 0;
20+
if [[ "$FORCE_BUNDLING" ]]; then
21+
echo "FORCE_BUNDLING enabled; bundling even in Debug."
22+
else
23+
echo "Skipping bundling in Debug (since the packager bundles for you). Use the FORCE_BUNDLING flag if you want to change this behavior."
24+
exit 0;
25+
fi
26+
27+
DEV=true
1828
;;
1929
"")
2030
echo "$0 must be invoked by Xcode"

0 commit comments

Comments
 (0)