]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/build/client.sh
Merge branch 'release/4.0.0' into develop
[github/Chocobozzz/PeerTube.git] / scripts / build / client.sh
index 91147fc51d3867e599c4cc8202e0d5ddda8fe226..bae91a2b6ff97f626430c5d366af684d175d7121 100755 (executable)
@@ -35,12 +35,14 @@ 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
@@ -49,7 +51,7 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t
         additionalParams="--sourceMap=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]}
@@ -69,10 +71,12 @@ else
     additionalParams=""
     if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then
         additionalParams="--namedChunks=true --outputHashing=none"
+
+        # For webpack
         export ANALYZE_BUNDLE=true
     fi
 
-    npm run ng build -- --localize=false --output-path "dist/$defaultLanguage/" \
+    node --max_old_space_size=8192 node_modules/.bin/ng build --localize=false --output-path "dist/$defaultLanguage/" \
                         --deploy-url "/client/$defaultLanguage/" --configuration production --stats-json $additionalParams
 fi