mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-04 17:49:24 +01:00
8441a4e6ac
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
26 lines
605 B
Bash
Executable file
26 lines
605 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
main() {
|
|
for file in $(find content/ -not -ipath "./node_modules/*" -name '*.scss' -type f); do
|
|
bnam="${file##*/}"
|
|
out="${file%/*}/${bnam%.*}.min.css"
|
|
|
|
{
|
|
node-sass "$file" --output-style compressed >"$out"
|
|
autoprefixer-cli "$out" -o "$out.tmp"
|
|
mv "$out.tmp" "$out"
|
|
|
|
echo " >> Generated $out"
|
|
} &
|
|
done
|
|
|
|
wait
|
|
|
|
echo " >> Removing residuals"
|
|
find content/ -not -ipath "./node_modules/*" -name '_*.min.css' -or \
|
|
-name '*.sass.css' -type f -exec rm -rfv {} \;
|
|
}
|
|
|
|
main "$@"
|