mirror of
https://git.mills.io/prologic/zs-starter-template.git
synced 2024-11-21 21:06:03 +03:00
Fix posthook
This commit is contained in:
parent
cb755d0d7b
commit
74008910f8
18
.zs/posthook
18
.zs/posthook
@ -1,16 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
CSS="simple style"
|
CSS="simple style"
|
||||||
JS="live"
|
JS="live"
|
||||||
|
|
||||||
for css in $CSS; do
|
for css in $CSS; do
|
||||||
[ -f "$ZS_OUTDIR/css/$css.css" ] && minify -o "$ZS_OUTDIR/css/$css.min.css" "$ZS_OUTDIR/css/$css.css"
|
if [ -f "$ZS_OUTDIR/css/$css.css" ]; then
|
||||||
[ -f "$ZS_OUTDIR/css/$css.css" ]&& rm "$ZS_OUTDIR/css/$css.css"
|
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
|
done
|
||||||
|
|
||||||
for js in $JS; do
|
for js in $JS; do
|
||||||
[ -f "$ZS_OUTDIR/js/$js.js" ] && minify -o "$ZS_OUTDIR/js/$js.min.js" "$ZS_OUTDIR/js/$js.js"
|
if [ -f "$ZS_OUTDIR/js/$js.js" ]; then
|
||||||
[ -f "$ZS_OUTDIR/js/$js.js" ] && rm "$ZS_OUTDIR/js/$js.js"
|
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
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user