clean-up-svg-icons.sh 521 B

123456789101112131415161718
  1. #!/bin/bash
  2. # @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. # For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. # Cleans up and optimizes SVG files using the SVGO utility.
  5. # The configuration file is located in svgo.config.json.
  6. #
  7. # Usage:
  8. # yarn run clean-up-svg-icons path/to/icons/foo.svg
  9. #
  10. # To optimize the entire project:
  11. # yarn clean-up-svg-icons packages/**/theme/icons
  12. for i in "$@"
  13. do
  14. svgo --config=./scripts/svgo.config.json -i $i
  15. done