diff options
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/client.sh | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 106532c4f..e4d053e82 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -10,16 +10,19 @@ defaultLanguage="en_US" | |||
10 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json | 10 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json |
11 | mv "./dist/$defaultLanguage/assets" "./dist" | 11 | mv "./dist/$defaultLanguage/assets" "./dist" |
12 | 12 | ||
13 | # Supported languages | 13 | # Don't build other languages if --light arg is provided |
14 | languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo") | 14 | if [ -z ${1+x} ] || [ "$1" != "--light" ]; then |
15 | 15 | # Supported languages | |
16 | for lang in "${languages[@]}"; do | 16 | languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo") |
17 | npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ | 17 | |
18 | --output-path "dist/$lang/" --deploy-url "/client/$lang/" | 18 | for lang in "${languages[@]}"; do |
19 | 19 | npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ | |
20 | # Do no duplicate assets | 20 | --output-path "dist/$lang/" --deploy-url "/client/$lang/" |
21 | rm -r "./dist/$lang/assets" | 21 | |
22 | done | 22 | # Do no duplicate assets |
23 | rm -r "./dist/$lang/assets" | ||
24 | done | ||
25 | fi | ||
23 | 26 | ||
24 | NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json" | 27 | NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json" |
25 | 28 | ||