Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'svgop' released. Compiled binary executables of svgo for macOS and Windows #783

Closed
twardoch opened this issue Aug 31, 2017 · 4 comments
Closed

Comments

@twardoch
Copy link

twardoch commented Aug 31, 2017

Hi all,

I’ve spent the last night on preparing compiled binary executable packages of svgo for macOS and Windows which can be run without Nodejs installed. The result is at:

I used pkg to prepare the distributables. pkg choked on two things:

  • some aspects of coa.js (so I ended up not using it but just hardcoding some parameters),
  • the dynamic loading of plugins (the require('../../plugins/' + name) thing), so I ended up hardcoding the list of plugins and using portions of the rejected PR 614 by @joeldenning.

Also: I don’t know shit about JS (really) and about Node and about packaging, so I ended up with a very hacky Makefile which hacks it all together. :) But it works!

I’d still prefer if svgo plugin loading was rewritten upstream in a way that doesn’t make pkg (and Jspm and possibly other environments) choke. The current method is not nice.

Patches, pull requests or comments on https://github.com/twardoch/svgop are most welcome.

@twardoch
Copy link
Author

(I also briefly thought on taking on #411 but realized that I’m far too slow with writing JS. But anyone else is most welcome to tackle that one! :) ).

@douglasmiranda
Copy link

This tool (svgo) is the best so far!

Would be awesome a official binary release.


I saw a reference here too #777 (comment) but no answer, some official member could clarify here if there's interest to release standalone executables.

@twardoch
Copy link
Author

I've managed to compile svgo with QuickJS, so the native macOS binary is now 1.9 MB. Previous method (pkg) produced 83 MB :)

https://github.com/twardoch/svgop

@TrySound
Copy link
Member

Great! Check the new version https://github.com/svg/svgo/releases/tag/v2.0.0
Dynamic plugins loading is removed. Though config is still loaded this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants