]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/build/client.sh
Refactor a little bit watch html
[github/Chocobozzz/PeerTube.git] / scripts / build / client.sh
index 0e7925be5c29c9a153a647ae9b9948c8abf3f479..0b7cbec35f4a607ad6fcae97caa5c392364a01c5 100755 (executable)
@@ -34,16 +34,22 @@ languages=(
     ["eo"]="eo"
     ["de"]="de-DE"
     ["it"]="it-IT"
+    ["sq"]="sq"
     ["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
-    npm run ng build -- --prod --output-path "dist/build"
+    additionalParams=""
+    if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then
+        additionalParams="--sourceMap=true"
+    fi
+
+    npm run ng build -- --configuration production --output-path "dist/build" $additionalParams
 
     for key in "${!languages[@]}"; do
         lang=${languages[$key]}
@@ -66,7 +72,8 @@ else
         export ANALYZE_BUNDLE=true
     fi
 
-    npm run ng build -- --localize=false --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json $additionalParams
+    npm run ng build -- --localize=false --output-path "dist/$defaultLanguage/" \
+                        --deploy-url "/client/$defaultLanguage/" --configuration production --stats-json $additionalParams
 fi
 
 cp "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest"