This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
Sphere/scripts/build

25 lines
859 B
Text
Raw Permalink Normal View History

2016-02-21 16:41:11 +00:00
#!/bin/bash
if [ -z "$NVM_DIR" ]
then
NVM_DIR="~/.nvm"
fi
. $NVM_DIR/nvm.sh
nvm install
nvm use
set -e
npm install
2016-04-28 16:09:34 +01:00
echo "Fixing the hacks..."
# React-Native doesnt like having .babelrc files in modules, and officially suggests not shipping react-native modules with them included.
# This script scans all sub-dirs of node_modules, and removes any it finds, except the ones inside react-native itself.
find node_modules -type f -name .babelrc | grep -v /react-native/ | xargs rm || echo "Already patched!"
2016-04-28 17:34:40 +01:00
# There appears to be some problem with this module, whether it's in the babelify, or just some bug in the version we've locked to.
# Caused by 'self' not being defined in that scope. This fix pushes an update that just returns the built in fetch command.
echo "module.exports = fetch;" > node_modules/isomorphic-fetch/fetch-npm-browserify.js