diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-02 15:33:58 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-02 15:37:18 +0100 |
commit | 29f148a61381727a432c22a71c7a2b7cc23d9c9e (patch) | |
tree | d8830f17bc7e1a98484240a9977e208699da1d00 /scripts/build/client.sh | |
parent | 69eddafb17c4cf8e5a6dbd19e6d216c58140d153 (diff) | |
download | PeerTube-29f148a61381727a432c22a71c7a2b7cc23d9c9e.tar.gz PeerTube-29f148a61381727a432c22a71c7a2b7cc23d9c9e.tar.zst PeerTube-29f148a61381727a432c22a71c7a2b7cc23d9c9e.zip |
Add ability to build client with source maps
Diffstat (limited to 'scripts/build/client.sh')
-rwxr-xr-x | scripts/build/client.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 0e7925be5..fd072b18c 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -43,7 +43,12 @@ rm -rf ./dist ./compiled | |||
43 | 43 | ||
44 | # Don't build other languages if --light arg is provided | 44 | # Don't build other languages if --light arg is provided |
45 | if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then | 45 | if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); then |
46 | npm run ng build -- --prod --output-path "dist/build" | 46 | additionalParams="" |
47 | if [ ! -z ${1+x} ] && [ "$1" == "--source-map" ]; then | ||
48 | additionalParams="--sourceMap=true" | ||
49 | fi | ||
50 | |||
51 | npm run ng build -- --prod --output-path "dist/build" $additionalParams | ||
47 | 52 | ||
48 | for key in "${!languages[@]}"; do | 53 | for key in "${!languages[@]}"; do |
49 | lang=${languages[$key]} | 54 | lang=${languages[$key]} |