From 9452d4fd3321148fb80b64a67bd9983fee6c208e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 Jul 2022 15:44:14 +0200 Subject: /!\ Use a dedicated config file for development It means you have to replace NODE_ENV=test to NODE_ENV=dev if you use it npm run dev:* commands are already updated --- scripts/dev/client.sh | 6 +++--- scripts/dev/embed.sh | 4 ++-- scripts/dev/index.sh | 2 +- scripts/dev/server.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/dev/client.sh b/scripts/dev/client.sh index 1846f9a7d..92e8bb6ac 100755 --- a/scripts/dev/client.sh +++ b/scripts/dev/client.sh @@ -9,12 +9,12 @@ if [ ! -z ${2+x} ] && [ "$2" = "--ar-locale" ]; then fi clientCommand="cd client && node --max_old_space_size=4096 node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration $clientConfiguration --host 0.0.0.0 --disable-host-check --port 3000" -serverCommand="npm run build:server && NODE_ENV=test node dist/server" +serverCommand="npm run build:server && NODE_ENV=dev node dist/server" if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then - NODE_ENV=test eval $clientCommand + eval $clientCommand else - NODE_ENV=test node node_modules/.bin/concurrently -k \ + node node_modules/.bin/concurrently -k \ "$clientCommand" \ "$serverCommand" fi diff --git a/scripts/dev/embed.sh b/scripts/dev/embed.sh index b4835604e..e694950e6 100755 --- a/scripts/dev/embed.sh +++ b/scripts/dev/embed.sh @@ -2,6 +2,6 @@ set -eu -NODE_ENV=test npm run concurrently -- -k \ +npm run concurrently -- -k \ "cd client && npm run webpack -- --config webpack/webpack.video-embed.js --mode development --watch" \ - "npm run build:server && NODE_ENV=test npm start" + "npm run build:server && NODE_ENV=dev npm start" diff --git a/scripts/dev/index.sh b/scripts/dev/index.sh index beb88606f..7e0332115 100755 --- a/scripts/dev/index.sh +++ b/scripts/dev/index.sh @@ -2,6 +2,6 @@ set -eu -NODE_ENV=test npm run concurrently -- -k \ +npm run concurrently -- -k \ "sh scripts/dev/client.sh --skip-server ${1:-}" \ "sh scripts/dev/server.sh --skip-client" diff --git a/scripts/dev/server.sh b/scripts/dev/server.sh index 9dae43a63..c52c5124c 100755 --- a/scripts/dev/server.sh +++ b/scripts/dev/server.sh @@ -22,4 +22,4 @@ npm run resolve-tspaths:server cp -r ./server/static ./server/assets ./dist/server cp -r "./server/lib/emails" "./dist/server/lib" -./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=test node dist/server"' +./node_modules/.bin/tsc-watch --build --preserveWatchOutput --verbose --onSuccess 'sh -c "npm run resolve-tspaths:server && NODE_ENV=dev node dist/server"' -- cgit v1.2.3