aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-05 16:44:48 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-06 09:42:33 +0200
commitd632a147293b36e46549a3ead754ef52d8fea735 (patch)
treefb7124216a69b4b4a40e52b26eba964403c910d2 /scripts
parentc7a53f61212126fcad1b503003804a7468766a7f (diff)
downloadPeerTube-d632a147293b36e46549a3ead754ef52d8fea735.tar.gz
PeerTube-d632a147293b36e46549a3ead754ef52d8fea735.tar.zst
PeerTube-d632a147293b36e46549a3ead754ef52d8fea735.zip
Test bundlewatch
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/client.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh
index a9eceebf9..75da6765c 100755
--- a/scripts/build/client.sh
+++ b/scripts/build/client.sh
@@ -30,15 +30,21 @@ rm -rf ./dist ./compiled
30 30
31pre_build_hook 31pre_build_hook
32 32
33additionalParams=""
34if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then
35 additionalParams="--namedChunks=true --outputHashing=none"
36fi
37
38
33defaultLanguage="en-US" 39defaultLanguage="en-US"
34npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json 40npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json $additionalParams
35mv "./dist/$defaultLanguage/assets" "./dist" 41mv "./dist/$defaultLanguage/assets" "./dist"
36mv "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest" 42mv "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest"
37 43
38post_build_hook 44post_build_hook
39 45
40# Don't build other languages if --light arg is provided 46# Don't build other languages if --light arg is provided
41if [ -z ${1+x} ] || [ "$1" != "--light" ]; then 47if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then
42 if [ ! -z ${1+x} ] && [ "$1" == "--light-hu" ]; then 48 if [ ! -z ${1+x} ] && [ "$1" == "--light-hu" ]; then
43 languages=(["hu"]="hu-HU") 49 languages=(["hu"]="hu-HU")
44 elif [ ! -z ${1+x} ] && [ "$1" == "--light-ar" ]; then 50 elif [ ! -z ${1+x} ] && [ "$1" == "--light-ar" ]; then