aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-07 16:50:33 +0200
committerChocobozzz <me@florianbigard.com>2018-06-07 16:50:33 +0200
commit6cca7360eb9027e1544f7513df7da4684061ef7e (patch)
tree16550f99324234a94cb7cdb098001051400079c9 /scripts
parent09f35e2a6fa71d593c9b22f90109e91fc6be89a1 (diff)
downloadPeerTube-6cca7360eb9027e1544f7513df7da4684061ef7e.tar.gz
PeerTube-6cca7360eb9027e1544f7513df7da4684061ef7e.tar.zst
PeerTube-6cca7360eb9027e1544f7513df7da4684061ef7e.zip
Reduce bundle sizes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/client.sh2
-rwxr-xr-xscripts/client-report.sh6
-rwxr-xr-xscripts/dev/client.sh2
-rwxr-xr-xscripts/dev/index.sh2
-rwxr-xr-xscripts/e2e.sh2
-rwxr-xr-xscripts/watch/server.sh2
6 files changed, 9 insertions, 7 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh
index d3da7cfcf..58aca437b 100755
--- a/scripts/build/client.sh
+++ b/scripts/build/client.sh
@@ -21,7 +21,7 @@ for lang in "$languages"; do
21 rm -r "./dist/$lang/assets" 21 rm -r "./dist/$lang/assets"
22done 22done
23 23
24NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production 24NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json"
25 25
26# Copy runtime locales 26# Copy runtime locales
27cp -r "./src/locale/target" "./dist/locale" \ No newline at end of file 27cp -r "./src/locale/target" "./dist/locale" \ No newline at end of file
diff --git a/scripts/client-report.sh b/scripts/client-report.sh
index 4dd4b418b..df7ccda27 100755
--- a/scripts/client-report.sh
+++ b/scripts/client-report.sh
@@ -2,6 +2,8 @@
2 2
3set -eu 3set -eu
4 4
5cd client 5gawk -i inplace 'BEGIN { found=0 } { if (found || $0 ~ /^{/) { found=1; print }}' ./client/dist/embed-stats.json
6 6
7npm run webpack-bundle-analyzer ./dist/stats.json 7npm run concurrently -- -k \
8 "cd client && npm run webpack-bundle-analyzer -- -p 8888 ./dist/en_US/stats.json" \
9 "cd client && npm run webpack-bundle-analyzer -- -p 8889 ./dist/embed-stats.json" \ No newline at end of file
diff --git a/scripts/dev/client.sh b/scripts/dev/client.sh
index ecd934888..c630de2c4 100755
--- a/scripts/dev/client.sh
+++ b/scripts/dev/client.sh
@@ -2,6 +2,6 @@
2 2
3set -eu 3set -eu
4 4
5NODE_ENV=test concurrently -k \ 5NODE_ENV=test npm run concurrently -- -k \
6 "npm run watch:client" \ 6 "npm run watch:client" \
7 "npm run build:server && NODE_ENV=test npm start" 7 "npm run build:server && NODE_ENV=test npm start"
diff --git a/scripts/dev/index.sh b/scripts/dev/index.sh
index dcbf62d37..7fc1560ab 100755
--- a/scripts/dev/index.sh
+++ b/scripts/dev/index.sh
@@ -2,6 +2,6 @@
2 2
3set -eu 3set -eu
4 4
5NODE_ENV=test concurrently -k \ 5NODE_ENV=test npm run concurrently -- -k \
6 "npm run watch:client" \ 6 "npm run watch:client" \
7 "npm run watch:server" 7 "npm run watch:server"
diff --git a/scripts/e2e.sh b/scripts/e2e.sh
index 0e70e6e51..1e31cd57c 100755
--- a/scripts/e2e.sh
+++ b/scripts/e2e.sh
@@ -10,7 +10,7 @@ npm run clean:server:test
10 npm run webpack -- --config webpack/webpack.video-embed.js --mode development 10 npm run webpack -- --config webpack/webpack.video-embed.js --mode development
11) 11)
12 12
13concurrently -k -s first \ 13npm run concurrently -- -k -s first \
14 "cd client && npm run ng -- e2e --port 3333" \ 14 "cd client && npm run ng -- e2e --port 3333" \
15 "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warning\" } }' npm start" 15 "NODE_ENV=test NODE_APP_INSTANCE=1 NODE_CONFIG='{ \"log\": { \"level\": \"warning\" } }' npm start"
16 16
diff --git a/scripts/watch/server.sh b/scripts/watch/server.sh
index badbf3da0..da8bff1da 100755
--- a/scripts/watch/server.sh
+++ b/scripts/watch/server.sh
@@ -7,6 +7,6 @@ mkdir -p "./client/dist"
7rm -r "./client/dist/locale" 7rm -r "./client/dist/locale"
8cp -r "./client/src/locale/target" "./client/dist/locale" 8cp -r "./client/src/locale/target" "./client/dist/locale"
9 9
10NODE_ENV=test concurrently -k \ 10NODE_ENV=test npm run concurrently -- -k \
11 "npm run tsc -- --sourceMap && npm run nodemon -- --delay 2 --watch ./dist dist/server" \ 11 "npm run tsc -- --sourceMap && npm run nodemon -- --delay 2 --watch ./dist dist/server" \
12 "npm run tsc -- --sourceMap --preserveWatchOutput -w" 12 "npm run tsc -- --sourceMap --preserveWatchOutput -w"