Reduce dev commands RAM usage

This commit is contained in:
Chocobozzz 2020-01-22 10:00:38 +01:00
parent 11c4e36066
commit 36619ac8f5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 9 additions and 9 deletions

View File

@ -42,9 +42,9 @@
"reset-password": "node ./dist/scripts/reset-password.js",
"play": "scripty",
"dev": "scripty",
"dev:server": "scripty",
"dev:server": "sh ./scripts/dev/server.sh",
"dev:embed": "scripty",
"dev:client": "scripty",
"dev:client": "sh ./scripts/dev/client.sh",
"dev:cli": "scripty",
"start": "node dist/server",
"start:server": "node dist/server --no-client",

View File

@ -9,7 +9,7 @@ fi
killall -q peertube || true
perl -0777 -i -pe 's#proxy:(\n\s+)enabled: false\n\s+url: ""#proxy:$1enabled: true$1url: "https://cpy.re:7899"#' config/test.yaml
perl -0777 -i -pe 's#proxy:(\n\s+)enabled: false\n\s+url: ""#proxy:$1enabled: true$1url: "http://188.165.225.149:7899"#' config/test.yaml
if [ "$1" = "misc" ]; then
npm run build -- --light-fr

View File

@ -2,13 +2,13 @@
set -eu
clientCommand="cd client && npm run 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 npm start"
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
NODE_ENV=test eval $clientCommand
else
NODE_ENV=test npm run concurrently -- -k \
NODE_ENV=test node node_modules/.bin/concurrently -k \
"$clientCommand" \
"$serverCommand"
fi

View File

@ -20,6 +20,6 @@ cp "./tsconfig.json" "./dist"
npm run tsc -- --incremental --sourceMap
cp -r ./server/static ./server/assets ./dist/server
NODE_ENV=test npm run concurrently -- -k \
"npm run nodemon -- --delay 1 --watch ./dist dist/server" \
"npm run tsc -- --incremental --sourceMap --preserveWatchOutput -w"
NODE_ENV=test node node_modules/.bin/concurrently -k \
"node_modules/.bin/nodemon --delay 1 --watch ./dist dist/server" \
"node_modules/.bin/tsc --incremental --sourceMap --preserveWatchOutput -w"