Skip to content

Instantly share code, notes, and snippets.

@franzwilding
Created December 11, 2015 12:10
Show Gist options
  • Save franzwilding/fbd503ca058e4f859369 to your computer and use it in GitHub Desktop.
Save franzwilding/fbd503ca058e4f859369 to your computer and use it in GitHub Desktop.
Automatically convert a sketch file to a svg sprite. Each sketch artboard will be an icon and can be accessed by #ARTBOARD-ID
#!/bin/sh
sketchtool export artboards icons.sketch --formats=svg --output=./icons
svg-sprite --symbol ./icons/*.svg
sed 's/#000/currentColor/g; s/#000000/currentColor/g' ./symbol/svg/sprite.css.svg > icons.svg
rm -rf ./icons
rm -rf ./symbol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment