Skip to content

Commit 527d840

Browse files
committed
0.11.0
1 parent df798ea commit 527d840

File tree

5 files changed

+6
-41
lines changed

5 files changed

+6
-41
lines changed

FigmaExport.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "FigmaExport"
3-
spec.version = "0.10.5"
3+
spec.version = "0.11.0"
44
spec.summary = "Command line utility to export colors, icons and images from Figma to Xcode / Android Studio project."
55
spec.homepage = "https://github.com/RedMadRobot/figma-export"
66
spec.license = { type: "MIT", file: "LICENSE" }

Package.resolved

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
{
22
"object": {
33
"pins": [
4-
{
5-
"package": "Diff",
6-
"repositoryURL": "https://github.com/soffes/Diff",
7-
"state": {
8-
"branch": null,
9-
"revision": "859cf080426506d998058c3bece38fbdcf1fbc02",
10-
"version": "0.2.5"
11-
}
12-
},
134
{
145
"package": "PathKit",
156
"repositoryURL": "https://github.com/kylef/PathKit.git",

Package.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ let package = Package(
1515
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"),
1616
.package(url: "https://github.com/jpsim/Yams.git", from: "3.0.0"),
1717
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
18-
.package(url: "https://github.com/stencilproject/Stencil.git", from: "0.14.0"),
19-
.package(url: "https://github.com/soffes/Diff", from: "0.2.5")
18+
.package(url: "https://github.com/stencilproject/Stencil.git", from: "0.14.0")
2019
],
2120
targets: [
2221

@@ -58,7 +57,7 @@ let package = Package(
5857
),
5958
.testTarget(
6059
name: "XcodeExportTests",
61-
dependencies: ["XcodeExport", "Diff"]
60+
dependencies: ["XcodeExport"]
6261
)
6362
]
6463
)

Sources/XcodeExport/XcodeTypographyExporter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Label: UILabel {
9696
var style: LabelStyle? { nil }
9797
9898
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
99-
super.traitCollectionDtitleLabel?.fontidChange(previousTraitCollection)
99+
super.traitCollectionDidChange(previousTraitCollection)
100100
101101
if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory {
102102
updateText()

Tests/XcodeExportTests/XcodeTypographyExporterTests.swift

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import XCTest
22
import XcodeExport
33
import FigmaExportCore
4-
import Diff
54

65
final class XcodeTypographyExporterTests: XCTestCase {
76

@@ -221,7 +220,7 @@ final class XcodeTypographyExporterTests: XCTestCase {
221220
self.tracking = tracking
222221
}
223222
224-
funcs attributes(for alignment: NSTextAlignment, lineBreakMode: NSLineBreakMode) -> [NSAttributedString.Key: Any] {
223+
func attributes(for alignment: NSTextAlignment, lineBreakMode: NSLineBreakMode) -> [NSAttributedString.Key: Any] {
225224
226225
let paragraphStyle = NSMutableParagraphStyle()
227226
paragraphStyle.alignment = alignment
@@ -250,29 +249,6 @@ final class XcodeTypographyExporterTests: XCTestCase {
250249
}
251250
"""
252251

253-
let differ: () -> String = {
254-
var result = ""
255-
256-
let diff1 = diff(contentsLabel, String(data: files[0].data!, encoding: .utf8)!)
257-
let diff2 = diff(contentsLabelStyle, String(data: files[1].data!, encoding: .utf8)!)
258-
259-
if let d = diff1 {
260-
let a = String.Index(utf16Offset: d.0.lowerBound - 10, in: contentsLabel)
261-
let b = String.Index(utf16Offset: d.0.upperBound + 10, in: contentsLabel)
262-
print(contentsLabel[a..<b])
263-
result += "range=\(d.0) symbols=\(d.1)"
264-
}
265-
266-
if let d = diff2 {
267-
let a = String.Index(utf16Offset: d.0.lowerBound - 10, in: contentsLabel)
268-
let b = String.Index(utf16Offset: d.0.upperBound + 10, in: contentsLabel)
269-
print(contentsLabel[a..<b])
270-
result += "\nrange=\(d.0) symbols=\(d.1)"
271-
}
272-
273-
return result
274-
}
275-
276252
XCTAssertEqual(files.count, 2, "Must be generated 2 files but generated \(files.count)")
277253
XCTAssertEqual(
278254
files,
@@ -291,8 +267,7 @@ final class XcodeTypographyExporterTests: XCTestCase {
291267
),
292268
data: contentsLabelStyle.data(using: .utf8)!
293269
)
294-
],
295-
differ()
270+
]
296271
)
297272
}
298273

0 commit comments

Comments
 (0)