X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fbuild%2Fclient.sh;h=2bb3227648097add8e8a83531a2dfdd101b9d35f;hb=714e33a7428b71ef98129ce85a4bd64140bcd912;hp=91147fc51d3867e599c4cc8202e0d5ddda8fe226;hpb=1c5e49e75284100b7b1fc8b4e73c8ba53fe22e89;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 91147fc51..2bb322764 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh @@ -8,6 +8,7 @@ defaultLanguage="en-US" # Supported languages languages=( ["ar"]="ar" + ["fa"]="fa-IR" ["en"]="en-US" ["vi"]="vi-VN" ["hu"]="hu-HU" @@ -35,21 +36,23 @@ languages=( ["de"]="de-DE" ["it"]="it-IT" ["sq"]="sq" + ["nn"]="nn" + ["nb"]="nb-NO" ["kab"]="kab" ) cd client -rm -rf ./dist ./compiled +rm -rf ./dist # Don't build other languages if --light arg is provided if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then additionalParams="" if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then - additionalParams="--sourceMap=true" + additionalParams="--source-map=true" fi - npm run ng build -- --configuration production --output-path "dist/build" $additionalParams + node --max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams for key in "${!languages[@]}"; do lang=${languages[$key]} @@ -68,12 +71,14 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t else additionalParams="" if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then - additionalParams="--namedChunks=true --outputHashing=none" + additionalParams="--named-chunks=true --output-hashing=none" + + # For webpack export ANALYZE_BUNDLE=true fi - npm run ng build -- --localize=false --output-path "dist/$defaultLanguage/" \ - --deploy-url "/client/$defaultLanguage/" --configuration production --stats-json $additionalParams + node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \ + --configuration production --stats-json $additionalParams fi cp "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest"