Import colors from Figma library #4

Merged
Sven merged 15 commits from figma into main 2022-10-08 11:14:23 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 956c1f5d27 - Show all commits

View file

@ -1,7 +1,7 @@
protocol Importer {
init(source: String) throws
func read() throws -> [String: ColorDef]
func read() async throws -> [String: ColorDef]
static var option: String { get }
}

View file

@ -80,7 +80,7 @@ enum HelpTexts {
}
@main
public final class MakeColors: ParsableCommand, Context {
public final class MakeColors: AsyncParsableCommand, Context {
@Argument(help: HelpTexts.input)
var input: String
@ -101,9 +101,9 @@ public final class MakeColors: ParsableCommand, Context {
public init() {}
public func run() throws {
public func run() async throws {
let importer = try importer.type.init(source: input)
let data = try importer.read()
let data = try await importer.read()
if dump {
try dump(data: data)