diff --git a/FigmaExport.podspec b/FigmaExport.podspec index 2f4ff0ff..157671c5 100644 --- a/FigmaExport.podspec +++ b/FigmaExport.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "FigmaExport" - spec.version = "0.10.5" + spec.version = "0.11.0" spec.summary = "Command line utility to export colors, icons and images from Figma to Xcode / Android Studio project." spec.homepage = "https://github.com/RedMadRobot/figma-export" spec.license = { type: "MIT", file: "LICENSE" } diff --git a/Package.resolved b/Package.resolved index 6782a211..a309933c 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,15 +1,6 @@ { "object": { "pins": [ - { - "package": "Diff", - "repositoryURL": "https://github.com/soffes/Diff", - "state": { - "branch": null, - "revision": "859cf080426506d998058c3bece38fbdcf1fbc02", - "version": "0.2.5" - } - }, { "package": "PathKit", "repositoryURL": "https://github.com/kylef/PathKit.git", diff --git a/Package.swift b/Package.swift index fa79fe18..2503a66c 100644 --- a/Package.swift +++ b/Package.swift @@ -15,8 +15,7 @@ let package = Package( .package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"), .package(url: "https://github.com/jpsim/Yams.git", from: "3.0.0"), .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), - .package(url: "https://github.com/stencilproject/Stencil.git", from: "0.14.0"), - .package(url: "https://github.com/soffes/Diff", from: "0.2.5") + .package(url: "https://github.com/stencilproject/Stencil.git", from: "0.14.0") ], targets: [ @@ -58,7 +57,7 @@ let package = Package( ), .testTarget( name: "XcodeExportTests", - dependencies: ["XcodeExport", "Diff"] + dependencies: ["XcodeExport"] ) ] ) diff --git a/Sources/XcodeExport/XcodeTypographyExporter.swift b/Sources/XcodeExport/XcodeTypographyExporter.swift index c68e109e..572339c8 100644 --- a/Sources/XcodeExport/XcodeTypographyExporter.swift +++ b/Sources/XcodeExport/XcodeTypographyExporter.swift @@ -96,7 +96,7 @@ class Label: UILabel { var style: LabelStyle? { nil } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { - super.traitCollectionDtitleLabel?.fontidChange(previousTraitCollection) + super.traitCollectionDidChange(previousTraitCollection) if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory { updateText() diff --git a/Tests/XcodeExportTests/XcodeTypographyExporterTests.swift b/Tests/XcodeExportTests/XcodeTypographyExporterTests.swift index cec69df3..4801735c 100644 --- a/Tests/XcodeExportTests/XcodeTypographyExporterTests.swift +++ b/Tests/XcodeExportTests/XcodeTypographyExporterTests.swift @@ -1,7 +1,6 @@ import XCTest import XcodeExport import FigmaExportCore -import Diff final class XcodeTypographyExporterTests: XCTestCase { @@ -221,7 +220,7 @@ final class XcodeTypographyExporterTests: XCTestCase { self.tracking = tracking } - funcs attributes(for alignment: NSTextAlignment, lineBreakMode: NSLineBreakMode) -> [NSAttributedString.Key: Any] { + func attributes(for alignment: NSTextAlignment, lineBreakMode: NSLineBreakMode) -> [NSAttributedString.Key: Any] { let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.alignment = alignment @@ -250,29 +249,6 @@ final class XcodeTypographyExporterTests: XCTestCase { } """ - let differ: () -> String = { - var result = "" - - let diff1 = diff(contentsLabel, String(data: files[0].data!, encoding: .utf8)!) - let diff2 = diff(contentsLabelStyle, String(data: files[1].data!, encoding: .utf8)!) - - if let d = diff1 { - let a = String.Index(utf16Offset: d.0.lowerBound - 10, in: contentsLabel) - let b = String.Index(utf16Offset: d.0.upperBound + 10, in: contentsLabel) - print(contentsLabel[a..