minify_svg

This script will minify the *.svg files in the given directory ($PWD if not given) and its subdirectories.

If you are using macOS you might want to use ImageOptim instead of using this script.

It is advisable to minimize image files before adding them to a Git repository.

Minimizing image files during a build is usually bad idea unless the build generates images files.

Also, you might want to add a hash to the minified image file before adding it to a Git repository.

Usage

$ scripts/web/minify_svg.sh
$ scripts/web/minify_svg.sh dist

Prerequisites