Import colors from Figma library #4
2 changed files with 4 additions and 4 deletions
|
@ -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 }
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue