Make Font UIKit generation optional

This commit is contained in:
2025-07-17 10:43:54 +02:00
parent e22f9ba894
commit aaeca93cbc
10 changed files with 64 additions and 54 deletions

View File

@@ -22,7 +22,7 @@ enum ColorsToolError: Error {
var description: String {
switch self {
case .extensionNamesCollision(let extensionName):
return "error: [\(Fonts.toolName)] Error on extension names, extension name and SwiftUI extension name should be different (\(extensionName) is used on both)"
return "error: [\(Colors.toolName)] Error on extension names, extension name and SwiftUI extension name should be different (\(extensionName) is used on both)"
case .badFormat(let info):
return "error: [\(Colors.toolName)] Bad line format: \(info). Accepted format are: colorName=\"#RGB/#ARGB\"; colorName \"#RGB/#ARGB\"; colorName \"#RGB/#ARGB\" \"#RGB/#ARGB\""

View File

@@ -30,10 +30,10 @@ struct ColorsToolOptions: ParsableArguments {
@Option(help: "Path where to generate the extension.", transform: { $0.replaceTiltWithHomeDirectoryPath() })
var extensionOutputPath: String?
@Option(help: "Extension name. If not specified, no extension will be generated.")
@Option(help: "SwiftUI extension name. If not specified, no extension will be generated.")
var extensionName: String?
@Option(help: "SwiftUI Extension name. If not specified, no extension will be generated.")
@Option(help: "UIKit extension name. If not specified, no extension will be generated.")
var extensionNameUIKit: String?
@Option(help: "Extension suffix. Ex: MyApp, it will generate {extensionName}+ColorsMyApp.swift")