zs-starter-template/.zs/posthook

17 lines
424 B
Plaintext
Raw Normal View History

#!/bin/sh
set -e
2023-03-18 10:27:10 +03:00
CSS="simple style"
JS="live"
2023-03-18 10:27:10 +03:00
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
2023-03-18 10:27:10 +03:00
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