Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #158 from MForever78/master
Browse files Browse the repository at this point in the history
Fixes to catch Sketch API change and workaround CocoaScript bug
  • Loading branch information
MForever78 authored Nov 18, 2017
2 parents 51271f8 + 94de169 commit 6f4e2a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Marketch is a Sketch 3 plug-in for automatically generating html page that can m

## Change Log

#### `v1.0.23 fix`
* [fix] support sketch 46.2 and macOS 10.13

#### `v1.0.22 fix`
* [fix] multiple line text only show the first.

Expand Down
4 changes: 2 additions & 2 deletions marketch.sketchplugin/Contents/Sketch/util.cocoascript
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ var util = {

[zipTask setLaunchPath:@'/usr/bin/ditto'];
//zip参数
[zipTask setArguments:[NSArray arrayWithObjects: @'-c', @'-k', @'-X', @'--rsrc', zipFile, destination, nil]];
[zipTask setArguments:[NSArray arrayWithArray:['-c', '-k', '-X', '--rsrc', zipFile, destination]]];

[zipTask launch];
[zipTask waitUntilExit];
Expand Down Expand Up @@ -422,7 +422,7 @@ var util = {

//修正文字图层设置填充后颜色不正确的问题
if(fontStyle.hasEnabledFill()){
var fillColor = layer.style().fill().CSSAttributeString().split(':');
var fillColor = layer.style().fills()[0].CSSAttributeString().split(':');
if(fillColor.length > 1){
layerData.style.color = util.trim(fillColor[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion marketch.sketchplugin/Contents/Sketch/zip.cocoascript
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ExportAsZip.prototype = {
//task执行成功
doc.showMessage(I18N.EXPORTSUCCESS);
var zipURL = [NSURL fileURLWithPath: exportPath];
var fileURLs = [NSArray arrayWithObjects:zipURL, nil];
var fileURLs = [NSArray arrayWithArray:[zipURL]];
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:fileURLs];
}else{
doc.showMessage(I18N.EXPORTFAIL);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.0.22"
"version": "1.0.23"
}

0 comments on commit 6f4e2a6

Please sign in to comment.