tudou527 / marketch

Marketch is a Sketch 3 plug-in for automatically generating html page that can measure and get CSS styles on it.
http://tudou527.github.io/marketch/
GNU General Public License v3.0
2.92k stars 304 forks source link

Fixes to catch Sketch API change and workaround CocoaScript bug #158

Closed MForever78 closed 6 years ago

MForever78 commented 7 years ago

This PR contains two changes:

  1. [NSArray arrayWithObjects] stops working on 10.13. This is a bug caused by CocoaScript itself. Reference on: https://github.com/ccgus/CocoaScript/issues/48 . We can workaround this bug by using [NSArray arrayWithArray] instead.
  2. Sketch changed API on layer.style().fill(). It now called layer.style.fills() and returns an array of fill objects. We should just use the first element of this array and call the CSSAttributeString method.

Tested locally and is able to export.

emfawcett commented 6 years ago

Hi there

I would love to try this plug in but when export as zip no file is produced. I am running Sketch 47.1. Is there an updated plugin file for this at all? Many thanks - Emma