Skip to content

Commit

Permalink
Merge branch 'release/v1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitcanyurtsever committed Feb 16, 2019
2 parents 1c50bbf + 9017e25 commit b18b207
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Zeplin.sketchplugin/Contents/Sketch/export.cocoascript
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ var onRun = function (context) {

layers = nil;

var containsArtboard = false;
var artboardsLoop = [artboards objectEnumerator];
var artboard = nil;
while (artboard = [artboardsLoop nextObject]) {
var artboardClassName = NSStringFromClass([artboard class]);
if ([artboardClassName isEqualToString:@"MSArtboardGroup"]) {
containsArtboard = true;

break;
}
}

artboard = nil;
artboardsLoop = nil;

var uniqueArtboardSizes = [];
// `size` on `CGRect` fails on Mocha, on macOS 10.13, Sketch 45 and below.
try {
Expand Down Expand Up @@ -176,6 +191,7 @@ var onRun = function (context) {
[directives setObject:uniqueArtboardSizes forKey:@"artboardSizes"];
[directives setObject:assetLibraries forKey:@"assetLibraries"];
[directives setObject:artboardNamesByIdentifier forKey:@"artboardNames"];
[directives setObject:containsArtboard forKey:@"containsArtboard"];
if (version) {
[directives setObject:version forKey:@"version"];
}
Expand Down
2 changes: 1 addition & 1 deletion Zeplin.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "Zeplin, Inc.",
"authorEmail": "dev@zeplin.io",
"homepage": "https://zeplin.io",
"version": "1.6.5",
"version": "1.7",
"identifier": "io.zeplin.sketch-plugin",
"icon": "Icons/icZeplin.png",
"commands": [{
Expand Down

0 comments on commit b18b207

Please sign in to comment.