Build: Adjust frontend deploy script

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-01-27 13:29:21 +00:00
parent 52bbcb4489
commit fc62114409

View File

@ -1,9 +1,10 @@
#!/bin/bash
echo "Running UglifyJS"
JSIN="/data/in/js/"
JSOUT="/data/out/js"
uglifyjs-folder "$JSIN" -x ".js" -eo "$JSOUT"
ROOTIN="/data/in"
ROOTOUT="/data/out"
echo "Running UglifyJS on /data/in folder"
uglifyjs-folder "$ROOTIN" -x ".js" -eo "$ROOTOUT"
echo "Running UglifyCSS"
CSSIN="/data/in/styles/"
@ -22,7 +23,7 @@ done
echo "Moving 'styles' to 'out'"
cp -r /data/in/styles /data/out/styles
echo "Running html-minifier-terser"
echo "Running html-minifier-terser on /folder"
HTMLIN="/data/in/"
HTMLOUT="/data/out"
html-minifier-terser --collapse-whitespace --remove-comments --file-ext html --input-dir /data/in/ --output-dir /data/out/