Norkart / Leaflet-MiniMap

A minimap control plugin for Leaflet
BSD 2-Clause "Simplified" License
395 stars 125 forks source link

optimize toggle.svg with svgo #145

Closed johnd0e closed 5 years ago

johnd0e commented 5 years ago

329B now (and it's possible to squeeze even more if we drop some number precision)

Tools: https://github.com/svg/svgo https://jakearchibald.github.io/svgomg/

Setup:

robpvn commented 5 years ago

Well, that was an impressive reduction! But I don't want to strip down the original source like this, in case it needs changes. There is already a build command in package.json, npm run build:img, that uses svgo to compress the SVG for distribution. But I see that it doesn't reduce as much as you've managed here. Do you want to have a go at passing in the right options in the script to make it this small? A new PR referencing this one would probably be cleanest.

johnd0e commented 5 years ago

There is already a build command in package.json, npm run build:img, that uses svgo to compress the SVG for distribution.

Well, (without any source changes) I just run npm run build:img and get toggle.svg sized 259B. So I suppose you should update the file in dist folder.

Edit: SVGO has to be updated. I will make PR.