-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aef66f7
commit d812fe3
Showing
7 changed files
with
446 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
// swift-tools-version: 5.7 | ||
// swift-tools-version: 5.9 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "ThemePark", | ||
platforms: [ | ||
.macOS(.v10_15), | ||
.iOS(.v13), | ||
.tvOS(.v13), | ||
.watchOS(.v6), | ||
.macCatalyst(.v13), | ||
.visionOS(.v1), | ||
], | ||
products: [ | ||
.library(name: "ThemePark", targets: ["ThemePark"]), | ||
], | ||
targets: [ | ||
.target(name: "ThemePark"), | ||
.testTarget(name: "ThemeParkTests", dependencies: ["ThemePark"]), | ||
.testTarget( | ||
name: "ThemeParkTests", | ||
dependencies: ["ThemePark"], | ||
resources: [.copy("Resources")] | ||
), | ||
] | ||
) | ||
|
||
let swiftSettings: [SwiftSetting] = [ | ||
.enableExperimentalFeature("StrictConcurrency"), | ||
.enableUpcomingFeature("DisableOutwardActorInference"), | ||
] | ||
|
||
for target in package.targets { | ||
var settings = target.swiftSettings ?? [] | ||
settings.append(contentsOf: swiftSettings) | ||
target.swiftSettings = settings | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Foundation | ||
|
||
#if canImport(UniformTypeIdentifiers) | ||
import UniformTypeIdentifiers | ||
|
||
@available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) | ||
extension UTType { | ||
public static let textMateTheme = UTType(importedAs: "com.macromates.textmate.theme", conformingTo: .propertyList) | ||
} | ||
#endif | ||
|
||
public struct TextMateTheme: Codable { | ||
public struct Setting: Codable { | ||
public let name: String? | ||
public let scope: String? | ||
public let settings: [String: String] | ||
} | ||
|
||
public let author: String | ||
public let name: String | ||
public let semanticClass: String | ||
public let uuid: UUID | ||
public let settings: [Setting] | ||
|
||
public init(with data: Data) throws { | ||
let decoder = PropertyListDecoder() | ||
|
||
self = try decoder.decode(Self.self, from: data) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.