]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Update build steps for localization
authorChocobozzz <me@florianbigard.com>
Wed, 12 Aug 2020 08:29:44 +0000 (10:29 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 14 Aug 2020 07:34:07 +0000 (09:34 +0200)
client/angular.json
scripts/build/client.sh

index e07cf6707d58dc71e5815360d94c68fb6a029df0..06223b837f55f7b5134a81941c4df465d2455705 100644 (file)
                 }
               ]
             },
+            "i18n": {
+              "optimization": false,
+              "outputHashing": "none",
+              "sourceMap": true,
+              "extractCss": true,
+              "namedChunks": true,
+              "aot": true,
+              "buildOptimizer": false,
+              "budgets": []
+            },
             "hmr": {
               "budgets": [
                 {
index 878de60df0169e07f464bf37707df734e991a6b1..644a0807f2f7026baa5ee09480aa510cf051cb25 100755 (executable)
@@ -36,6 +36,10 @@ if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then
     export ANALYZE_BUNDLE=true
 fi
 
+if [ ! -z ${1+x} ] && [ "$1" == "--i18n" ]; then
+    additionalParams="--configuration=i18n"
+    export ANALYZE_BUNDLE=true
+fi
 
 defaultLanguage="en-US"
 npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json $additionalParams
@@ -45,7 +49,7 @@ mv "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest"
 post_build_hook
 
 # Don't build other languages if --light arg is provided
-if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then
+if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ] && [ "$1" != "--i18n" ]); then
     if [ ! -z ${1+x} ] && [ "$1" == "--light-hu" ]; then
         languages=(["hu"]="hu-HU")
     elif [ ! -z ${1+x} ] && [ "$1" == "--light-ar" ]; then