From 1794782c11a4555f8f4f7a8560185378311b32e9 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 28 Apr 2016 14:44:03 +0100 Subject: [PATCH] Add build script to fix babelrc problems --- build | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 build diff --git a/build b/build new file mode 100644 index 0000000..cb8d694 --- /dev/null +++ b/build @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ -z "$NVM_DIR" ] +then + NVM_DIR="~/.nvm" +fi + +. $NVM_DIR/nvm.sh +nvm install +nvm use + +set -e + +npm install + +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!"