diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-05 16:44:48 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-06 09:42:33 +0200 |
commit | d632a147293b36e46549a3ead754ef52d8fea735 (patch) | |
tree | fb7124216a69b4b4a40e52b26eba964403c910d2 /scripts/build | |
parent | c7a53f61212126fcad1b503003804a7468766a7f (diff) | |
download | PeerTube-d632a147293b36e46549a3ead754ef52d8fea735.tar.gz PeerTube-d632a147293b36e46549a3ead754ef52d8fea735.tar.zst PeerTube-d632a147293b36e46549a3ead754ef52d8fea735.zip |
Test bundlewatch
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/client.sh | 10 |
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 | ||
31 | pre_build_hook | 31 | pre_build_hook |
32 | 32 | ||
33 | additionalParams="" | ||
34 | if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then | ||
35 | additionalParams="--namedChunks=true --outputHashing=none" | ||
36 | fi | ||
37 | |||
38 | |||
33 | defaultLanguage="en-US" | 39 | defaultLanguage="en-US" |
34 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json | 40 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json $additionalParams |
35 | mv "./dist/$defaultLanguage/assets" "./dist" | 41 | mv "./dist/$defaultLanguage/assets" "./dist" |
36 | mv "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest" | 42 | mv "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest" |
37 | 43 | ||
38 | post_build_hook | 44 | post_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 |
41 | if [ -z ${1+x} ] || [ "$1" != "--light" ]; then | 47 | if [ -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 |