From 5e5af03d1151161069800b6de62c6c7ce8f274ce Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Thu, 3 Jan 2019 13:56:32 -0800 Subject: [PATCH] run npm install if needed in buildAssets.sh --- android/app/buildAssets.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/android/app/buildAssets.sh b/android/app/buildAssets.sh index df97bceb..b936c8db 100755 --- a/android/app/buildAssets.sh +++ b/android/app/buildAssets.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash - +if [ -d "../../node_modules" ] +then + echo "node_modules already present." +else + echo "node_modules not present, running npm install." + npm install +fi npm run build rm -rf src/main/assets mkdir -p src/main/assets -cp -R ../../dist/* src/main/assets \ No newline at end of file +cp -R ../../dist/* src/main/assets