Update nix shell and compress-images to work properly
This commit is contained in:
parent
0bb8b1c16a
commit
b7f702b4b6
2 changed files with 5 additions and 16 deletions
|
@ -1,17 +1,3 @@
|
|||
#!/bin/bash
|
||||
find ./dist \( -iname "*.jpg" -o -iname "*.jpeg" \) | jpegoptim -p -P --files-stdin -w $(nproc --all)
|
||||
oxipng -o max -a -r ./dist
|
||||
|
||||
if command -v jpegoptim >/dev/null 2>&1 ; then
|
||||
echo "jpegoptim found"
|
||||
find ./dist \( -iname "*.jpg" -o -iname "*.jpeg" \) | jpegoptim -p -P --files-stdin -w $(nproc --all)
|
||||
else
|
||||
echo "jpegoptim was not found! install either with your package manager or get the binary from the github"
|
||||
echo "https://github.com/tjko/jpegoptim/releases/latest"
|
||||
fi
|
||||
|
||||
if command -v oxipng >/dev/null 2>&1 ; then
|
||||
echo "oxipng found"
|
||||
oxipng -o max -a -r ./dist
|
||||
else
|
||||
echo "oxipng was not found! install with your package manager, cargo or get the binary from the github"
|
||||
echo "https://github.com/shssoichiro/oxipng/releases/latest"
|
||||
fi
|
||||
|
|
|
@ -7,5 +7,8 @@ pkgs.mkShell {
|
|||
pkgs.nodejs
|
||||
pkgs.pnpm
|
||||
pkgs.biome
|
||||
pkgs.oxipng
|
||||
pkgs.jpegoptim
|
||||
pkgs.croc
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue