| 1 | # Regenerates web/public icons from web/icons/*.svg. Run from web/ with `nix shell nixpkgs#resvg -c nu scripts/icons.nu`. |
| 2 | def render [src: string, out: string, size: int] { |
| 3 | ^resvg -w $size -h $size $"icons/($src)" $"public/($out)" |
| 4 | } |
| 5 | |
| 6 | cp icons/mark.svg public/favicon.svg |
| 7 | render mark.svg icon-192.png 192 |
| 8 | render mark.svg icon-512.png 512 |
| 9 | render mark-maskable.svg icon-maskable-512.png 512 |
| 10 | render mark.svg apple-touch-icon.png 180 |
| 11 | render mark.svg favicon-32.png 32 |