zs-starter-template/.zs/posthook
2023-03-18 17:27:10 +10:00

17 lines
424 B
Bash
Executable File

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