Add ability to build client with source maps

pull/3681/head
Chocobozzz 2021-02-02 15:33:58 +01:00
parent 69eddafb17
commit 29f148a613
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 7 additions and 2 deletions

View File

@ -43,7 +43,12 @@ rm -rf ./dist ./compiled
# Don't build other languages if --light arg is provided
if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then
npm run ng build -- --prod --output-path "dist/build"
additionalParams=""
if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then
additionalParams="--sourceMap=true"
fi
npm run ng build -- --prod --output-path "dist/build" $additionalParams
for key in "${!languages[@]}"; do
lang=${languages[$key]}

View File

@ -18,7 +18,7 @@ today=$(date '+%F')
directory_name="peertube-nightly-$today"
tar_name="peertube-nightly-$today.tar.xz"
npm run build
npm run build -- --source-map
nightly_version="nightly-$today"
sed -i 's/"version": "\([^"]\+\)"/"version": "\1-'"$nightly_version"'"/' ./package.json