vegan-prestwich/bin/build

29 lines
732 B
Plaintext
Raw Normal View History

2024-11-08 03:28:08 +00:00
#!/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
"
2024-11-26 02:21:28 +00:00
nix-shell -p nodePackages.pnpm nodejs_22 cacert curl --pure --command "
2024-11-26 02:04:48 +00:00
echo 'Testing npm registry'
curl -v https://registry.npmjs.org/
2024-11-08 03:28:08 +00:00
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
"