Skip to content

Instantly share code, notes, and snippets.

@lamvd0101
Last active November 2, 2022 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lamvd0101/8db52fe2238fd707a04f72783aace84f to your computer and use it in GitHub Desktop.
Save lamvd0101/8db52fe2238fd707a04f72783aace84f to your computer and use it in GitHub Desktop.
CLI_PATH=./node_modules/react-native/local-cli/cli.js
INTEGRATION_MODULE_FOLDER=ios/SDKOutput/Rescources
BUNDLE_NAME=rnsdk.jsbundle
if [ -d "${INTEGRATION_MODULE_FOLDER}" ]; then
rm -rf $INTEGRATION_MODULE_FOLDER
fi
mkdir $INTEGRATION_MODULE_FOLDER
# Create bundle
node $CLI_PATH ram-bundle \
--entry-file ./index.js \
--platform ios \
--dev false \
--bundle-output $INTEGRATION_MODULE_FOLDER/$BUNDLE_NAME \
--assets-dest $INTEGRATION_MODULE_FOLDER
# Remove json files
find $INTEGRATION_MODULE_FOLDER -name "*.json" -type f -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment