diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-12 10:29:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-14 09:34:07 +0200 |
commit | 8c360747995e17eb5520e22fc3d7bd4c3d26eeee (patch) | |
tree | 3be6bdcbb170ec6922af866938ccbdc3221fc8cc | |
parent | ef78fdbb2ef51033822e174cfe38b3f0d664df56 (diff) | |
download | PeerTube-8c360747995e17eb5520e22fc3d7bd4c3d26eeee.tar.gz PeerTube-8c360747995e17eb5520e22fc3d7bd4c3d26eeee.tar.zst PeerTube-8c360747995e17eb5520e22fc3d7bd4c3d26eeee.zip |
Update build steps for localization
-rw-r--r-- | client/angular.json | 10 | ||||
-rwxr-xr-x | scripts/build/client.sh | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/client/angular.json b/client/angular.json index e07cf6707..06223b837 100644 --- a/client/angular.json +++ b/client/angular.json | |||
@@ -203,6 +203,16 @@ | |||
203 | } | 203 | } |
204 | ] | 204 | ] |
205 | }, | 205 | }, |
206 | "i18n": { | ||
207 | "optimization": false, | ||
208 | "outputHashing": "none", | ||
209 | "sourceMap": true, | ||
210 | "extractCss": true, | ||
211 | "namedChunks": true, | ||
212 | "aot": true, | ||
213 | "buildOptimizer": false, | ||
214 | "budgets": [] | ||
215 | }, | ||
206 | "hmr": { | 216 | "hmr": { |
207 | "budgets": [ | 217 | "budgets": [ |
208 | { | 218 | { |
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 878de60df..644a0807f 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -36,6 +36,10 @@ if [ ! -z ${1+x} ] && [ "$1" == "--analyze-bundle" ]; then | |||
36 | export ANALYZE_BUNDLE=true | 36 | export ANALYZE_BUNDLE=true |
37 | fi | 37 | fi |
38 | 38 | ||
39 | if [ ! -z ${1+x} ] && [ "$1" == "--i18n" ]; then | ||
40 | additionalParams="--configuration=i18n" | ||
41 | export ANALYZE_BUNDLE=true | ||
42 | fi | ||
39 | 43 | ||
40 | defaultLanguage="en-US" | 44 | defaultLanguage="en-US" |
41 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json $additionalParams | 45 | 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" | |||
45 | post_build_hook | 49 | post_build_hook |
46 | 50 | ||
47 | # Don't build other languages if --light arg is provided | 51 | # Don't build other languages if --light arg is provided |
48 | if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then | 52 | if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ] && [ "$1" != "--i18n" ]); then |
49 | if [ ! -z ${1+x} ] && [ "$1" == "--light-hu" ]; then | 53 | if [ ! -z ${1+x} ] && [ "$1" == "--light-hu" ]; then |
50 | languages=(["hu"]="hu-HU") | 54 | languages=(["hu"]="hu-HU") |
51 | elif [ ! -z ${1+x} ] && [ "$1" == "--light-ar" ]; then | 55 | elif [ ! -z ${1+x} ] && [ "$1" == "--light-ar" ]; then |