zs-starter-template/.zs/posthook
2023-03-18 21:51:37 +10:00

25 lines
486 B
Bash
Executable File

#!/bin/sh
set -ex
CSS="simple style"
JS="live"
for css in $CSS; do
if [ -f "$ZS_OUTDIR/css/$css.css" ]; then
minify -o "$ZS_OUTDIR/css/$css.min.css" "$ZS_OUTDIR/css/$css.css"
fi
if [ -f "$ZS_OUTDIR/css/$css.css" ]; then
rm "$ZS_OUTDIR/css/$css.css"
fi
done
for js in $JS; do
if [ -f "$ZS_OUTDIR/js/$js.js" ]; then
minify -o "$ZS_OUTDIR/js/$js.min.js" "$ZS_OUTDIR/js/$js.js"
fi
if [ -f "$ZS_OUTDIR/js/$js.js" ]; then
rm "$ZS_OUTDIR/js/$js.js"
fi
done