Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (17 sloc) 710 Bytes
#!/bin/bash
echo "PostInstall script:"
echo "1. React Native nodeify..."
node_modules/.bin/rn-nodeify --install --hack
echo "2. Fix xmlhttprequest"
TARGET="node_modules/xmlhttprequest/lib/XMLHttpRequest.js"
sed -i'' -e 's/var spawn /\/\/var spawn/' $TARGET;
echo "3. Connext v2 fixes"
TARGET="node_modules/websocket-nats/lib/nats.js"
# set default nats port
sed -i'' -e 's/this.url = url;/this.url = url;this.url.port = 4222;/' $TARGET;
# remove core-js/stable
TARGET="node_modules/@connext/client/dist/connext.js"
sed -i'' -e 's/require("core-js\/stable");//' $TARGET;
# remove TCPSocket logs
TARGET="node_modules/react-native-tcp/TcpSocket.js"
sed -i'' -e 's/console.log.apply(console, args);//' $TARGET;
You can’t perform that action at this time.