Keep our current build system for now
authorChocobozzz <me@florianbigard.com>
Wed, 12 Feb 2020 13:09:24 +0000 (14:09 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 12 Feb 2020 13:09:55 +0000 (14:09 +0100)
scripts/build/client.sh

index aa3f89c03324789798bbd7f9713a902bc3dc2d58..912401faf6e99be08a41af25105d01a94f5431e4 100755 (executable)
@@ -76,11 +76,16 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then
         # TODO: remove when the project will use runtime translations
         pre_build_hook "$lang"
 
-        npm run ng build -- --prod --configuration="$lang"
+        npm run ng build -- --prod --configuration="$lang" --output-path "dist/build"
 
-        if [ ! "$lang" = "$key" ]; then
-          mv "dist/$key" "dist/$lang"
-        fi
+        # If --localize is not used
+        mv "dist/build/$key" "dist/$lang"
+        rmdir "dist/build"
+
+        # If --localize is used
+        # if [ ! "$lang" = "$key" ]; then
+        #   mv "dist/$key" "dist/$lang"
+        # fi
 
         # Do not duplicate assets
         rm -r "./dist/$lang/assets"