SketchAPI icon indicating copy to clipboard operation
SketchAPI copied to clipboard

Sketch.export is clunky when you want to export an object that already has ExportFormats

Open KevinGutowski opened this issue 5 years ago • 0 comments

Seems like you have to convert the ExportFormat js object into something that Sketch.export accepts. This is kinda silly because the native methods are much easier. I wish there was some more interoperability between the two.

Maybe

Sketch.export(layer,[exportFormat],output)

The problem is that Sketch.export is being used for more export options than sketch itself supports (blobs, json, etc). So I'm not entirely sure how to support both.

I think it would be super helpful if I could do this

Sketch.export(layer, output)

And the JS API would loop through all the export formats on the layer for me.

KevinGutowski avatar Nov 21 '20 04:11 KevinGutowski