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

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

Merged
merged 3 commits into from
Nov 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}