mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
/!\ 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
This commit is contained in:
parent
630d0a1bf5
commit
9452d4fd33
26 changed files with 207 additions and 106 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue