]>
Commit | Line | Data |
---|---|---|
10e63b68 | 1 | #!/bin/bash |
b20b5fed | 2 | |
0e4ffb4b LA |
3 | set -eu |
4 | ||
5 | cd client | |
b20b5fed | 6 | |
94edfc3b | 7 | rm -rf ./dist ./compiled |
d61e8153 | 8 | |
96bb360d | 9 | defaultLanguage="en_US" |
989e526a C |
10 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json |
11 | mv "./dist/$defaultLanguage/assets" "./dist" | |
12 | ||
e032aec9 C |
13 | # Don't build other languages if --light arg is provided |
14 | if [ -z ${1+x} ] || [ "$1" != "--light" ]; then | |
15 | # Supported languages | |
16 | languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo") | |
17 | ||
18 | for lang in "${languages[@]}"; do | |
19 | npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ | |
20 | --output-path "dist/$lang/" --deploy-url "/client/$lang/" | |
21 | ||
22 | # Do no duplicate assets | |
23 | rm -r "./dist/$lang/assets" | |
24 | done | |
25 | fi | |
989e526a | 26 | |
6cca7360 | 27 | NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json" |
989e526a | 28 | |
96bb360d C |
29 | # Copy runtime locales |
30 | cp -r "./src/locale/target" "./dist/locale" |