]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/build/client.sh
Fix broken replay with long live video name
[github/Chocobozzz/PeerTube.git] / scripts / build / client.sh
index 0b7cbec35f4a607ad6fcae97caa5c392364a01c5..e572adfe54c585db91c8b553fd39dd1f9634362b 100755 (executable)
@@ -8,6 +8,8 @@ defaultLanguage="en-US"
 # Supported languages
 languages=(
     ["ar"]="ar"
+    ["is"]="is"
+    ["fa"]="fa-IR"
     ["en"]="en-US"
     ["vi"]="vi-VN"
     ["hu"]="hu-HU"
@@ -31,10 +33,15 @@ languages=(
     ["ca"]="ca-ES"
     ["gl"]="gl-ES"
     ["cs"]="cs-CZ"
+    ["hr"]="hr"
     ["eo"]="eo"
     ["de"]="de-DE"
     ["it"]="it-IT"
+    ["uk"]="uk-UA"
     ["sq"]="sq"
+    ["tok"]="tok"
+    ["nn"]="nn"
+    ["nb"]="nb-NO"
     ["kab"]="kab"
 )
 
@@ -46,10 +53,10 @@ rm -rf ./dist
 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 +75,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"