Fix npm run dev
authorChocobozzz <me@florianbigard.com>
Wed, 19 Feb 2020 08:14:28 +0000 (09:14 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 19 Feb 2020 08:14:28 +0000 (09:14 +0100)
scripts/dev/client.sh
scripts/dev/index.sh
scripts/dev/server.sh

index a056b7d7fb1ea2a9c5cf1d77a0883d3a1cb30500..e9cade800571f657dddc6338cba944f1b89dcb79 100755 (executable)
@@ -5,7 +5,7 @@ set -eu
 clientCommand="cd client && node node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration hmr --host 0.0.0.0 --disable-host-check --port 3000"
 serverCommand="npm run build:server && NODE_ENV=test node dist/server"
 
-if [ ! -z ${1+x} ] && [ "$1" == "--skip-server" ]; then
+if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then
   NODE_ENV=test eval $clientCommand
 else
   NODE_ENV=test node node_modules/.bin/concurrently -k \
index 218d02b8c6a58f432c0f0b013e110bdae1079182..56addb7fe20dc9296eba9cae02039828aed1d070 100755 (executable)
@@ -4,4 +4,4 @@ set -eu
 
 NODE_ENV=test npm run concurrently -- -k \
   "sh scripts/dev/client.sh --skip-server" \
-  "sh scripts/dev/server.sh"
+  "sh scripts/dev/server.sh --skip-client"
index 187a1843e7b84219137e4f4a11015c39768879d6..680ca3d7915bf608c8c1730701e826575b8612af 100755 (executable)
@@ -3,8 +3,10 @@
 set -eu
 
 if [ ! -f "./client/dist/en-US/index.html" ]; then
-  echo "client/dist/en-US/index.html does not exist, compile client files..."
-  npm run build:client -- --light
+  if [ -z ${1+x} ] || [ "$1" != "--skip-client" ]; then
+    echo "client/dist/en-US/index.html does not exist, compile client files..."
+    npm run build:client -- --light
+  fi
 fi
 
 # Copy locales