Skip to content

This script is designed to refine and optimize SVG files for exporting to Flutter custom icons, ensuring no defective icons are generated.

Notifications You must be signed in to change notification settings

ibrahimEltayfe/refine_svg_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Refine SVG Script

This script is designed to refine and optimize SVG files for exporting to Flutter custom icons, ensuring no defective icons are generated.

Setup (macOS)

  1. Download Inkscape:

  2. Add Inkscape to zshrc:

    • Open the terminal and run:
      nano ~/.zshrc
    • Add the following line:
      export PATH="/Applications/Inkscape.app/Contents/MacOS:$PATH"
    • Save and exit by pressing Ctrl + O, then Enter, then Ctrl + X, then Y.
  3. Install SVGO using Homebrew:

    • Ensure Homebrew is installed. If not, visit Homebrew's official website for installation instructions.
    • Run the following command:
      brew install svgo
  4. Give the Script Permissions:

    • Run the following command in the terminal, replacing (put here the script path) with the actual path to your script:
      chmod 777 (put here the script path)

Usage

Now, create a directory and put all of your icons in it, put the script in this directory, then open the terminal in this directory, drag the script in the terminal then press enter.

Screen.Recording.2024-03-03.at.7.25.30.AM.mov

Now, you can upload the refined icons to the FlutterIcon website and they will appear as expected.

We welcome contributions for additional platform setups like Windows ..etc. Happy refining! 🚀

About

This script is designed to refine and optimize SVG files for exporting to Flutter custom icons, ensuring no defective icons are generated.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages