chrissimpkins / Crunch

Insane(ly slow but wicked good) PNG image optimization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Develop Sketch plugin [Help Wanted]

chrissimpkins opened this issue Β· comments

Need JS dev(s) who would be willing to pitch in to help with this.

I have never done a Sketch plugin but I'm interested in helping out here, it would be fun to learn. I know JS so that's no problem. I will check this out tonight and get back πŸ‘

What do you think is the best way to get the crunch binary into the sketch plugin? Ideally it should be bundled? πŸ€” Do you want to have the plugin in the same repo and built as an artefact or what's the preferred approach?

That sounds great Albin! We will need to package three things :

  • scripting for optimization execution (currently in Python but could easily be transitioned to JS for the plugin)
  • pngquant executable (compiled C++ binary)
  • zopflipng executable (compiled C++ binary)

I am not a Sketch user but can get a copy if we head down this road so that we can figure out an approach. I don't know how plug-ins are structured / UI design for them.

As for release, that is up to you. I would be happy to release it through this repo. if you want to create a repository and maintain it yourself we can point from this repo to that one. Whatever fits your development workflow. I will do what I can to pitch in on the effort wherever it takes place. I don't have much background in JS development so keep expectations about both contributions and repo maintenance low for my JS source contributions.

Here is one of the official plugins released by the Bohemian Coding group:

https://github.com/BohemianCoding/svgo-compressor

This might give us a start.

And licenses for Sketch are expensive...

@albinekb is this still something that you are interested in working on? I am prepared to buy a Sketch license to work on it if this is a go.

I haven't had time to look into it yet, I will post here when I can, I got a sketch license so I can start to play around πŸ‘

Sounds good. Wanted to confirm interest and availability before I invest in a license. Thanks!

I think you should email sketch about getting a license for doing the plugin πŸ‘ I got a free license when I found a security hole in their licensing (they didn't use SSL pinning...) πŸ˜„

I'm here if you have any specific questions :)

Thank you very much @mathieudutour! I am sure we will. Will be in touch with any problems that arise once the work gets started. Look forward to developing this plugin. It was requested by some of your users.

@mathieudutour Can you point to any existing open source plugins for Sketch that support image manipulation and file writes? I am familiarizing myself with your UI / plugin design / API. Thanks in advance.

@mathieudutour ty! will have a look

@albinekb Albin, how is July looking for you? Time is likely to free up a bit for me during the month if you'd like to work on this over the summer.

Also see #27 for an imagemin plugin implementation and conversation about how JS was implemented. That will likely prove useful to create this plugin.