PeerTube/scripts/build/client.sh

25 lines
650 B
Bash
Raw Normal View History

2018-03-27 10:35:12 +02:00
#!/bin/sh
2018-03-27 10:35:12 +02:00
set -eu
cd client
2017-12-13 17:51:32 +01:00
rm -rf ./dist ./compiled
2017-04-26 21:46:56 +02:00
2018-05-31 18:12:15 +02:00
defaultLanguage="en-US"
npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json
mv "./dist/$defaultLanguage/assets" "./dist"
languages="fr"
for lang in "$languages"; do
npm run ng build -- --prod --i18n-file "./src/locale/target/messages_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \
--output-path "dist/$lang/" --deploy-url "/client/$lang/"
# Do no duplicate assets
rm -r "./dist/$lang/assets"
done
2018-04-06 16:06:43 +02:00
NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production
2018-05-31 18:12:15 +02:00