27 lines
949 B
Swift
27 lines
949 B
Swift
//
|
|
// FontOptions.swift
|
|
//
|
|
//
|
|
// Created by Thibaut Schmitt on 17/01/2022.
|
|
//
|
|
|
|
import Foundation
|
|
import ArgumentParser
|
|
|
|
struct FontOptions: ParsableArguments {
|
|
@Flag(name: [.customShort("f"), .customShort("F")], help: "Should force generation")
|
|
var forceGeneration = false
|
|
|
|
@Argument(help: "Input files where fonts ared defined.", transform: { $0.replaceTiltWithHomeDirectoryPath() })
|
|
var inputFile: String
|
|
|
|
@Option(help: "Path where to generate the extension.", transform: { $0.replaceTiltWithHomeDirectoryPath() })
|
|
var extensionOutputPath: String
|
|
|
|
@Option(help: "Extension name. If not specified, it will generate an UIFont extension. Using default extension name will generate static property.")
|
|
var extensionName: String = FontTool.defaultExtensionName
|
|
|
|
@Option(help: "Extension suffix. Ex: MyApp, it will generate {extensionName}+FontsMyApp.swift")
|
|
var extensionSuffix: String = ""
|
|
}
|