vegan-prestwich/bin/build
2024-11-26 02:19:04 +00:00

29 lines
719 B
Bash
Executable file

#!/usr/bin/env bash
rm -rf _site
mkdir -p _site/style
nix-shell -p sass --pure --command "
echo 'Compiling SCSS'
sass style/style.scss _site/style/style.css
"
nix-shell -p lightningcss --pure --command "
echo 'Minifying CSS'
lightningcss --minify --targets '> 0.25%, not IE 11' _site/style/*.css -o _site/style/*.css
"
nix-shell -p pnpm nodejs_22 cacert curl --pure --command "
echo 'Testing npm registry'
curl -v https://registry.npmjs.org/
echo 'Building site'
pnpm add fast-glob @11ty/eleventy @11ty/eleventy-img
pnpm eleventy
"
nix-shell -p html-minifier --pure --command "
echo 'Minifying HTML'
html-minifier --input-dir _site --output-dir _site --collapse-whitespace --file-ext html
"