Exploring ways to export clean .svg icons with Sketch…the correct way

Hey Sean, found a simpler way to export clean SVG from anywhere in Sketch 3.


Just copy and paste these commands in your terminal and you’re good to go.

This one removes all the messy sketch metadata

defaults write com.bohemiancoding.sketch3 exportCompactSVG -bool yes

And this guy won’t use the name of the layer for the id field of the layer in SVG export. This is handy for developers like me who use build tools to generate names for my project’s icons.

defaults write com.bohemiancoding.sketch3 svgExportSkipAssignIdToLayerName -bool yes
Like what you read? Give dylan mcgowan a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.