This commit is contained in:
2023-12-08 16:21:14 +01:00
parent 2957da6233
commit 498c8fa4ae
6 changed files with 32 additions and 32 deletions

View File

@ -21,8 +21,8 @@ struct Fonts: ParsableCommand {
// MARK: - Static
static let toolName = "Fonts"
static let defaultExtensionName = "UIFont"
static let defaultExtensionNameSUI = "Font"
static let defaultExtensionName = "Font"
static let defaultExtensionNameUIKit = "UIFont"
// MARK: - Command Options
@ -52,13 +52,13 @@ struct Fonts: ParsableCommand {
staticVar: options.staticMembers,
extensionName: options.extensionName,
extensionFilePath: options.extensionFilePath,
isSwiftUI: false)
isSwiftUI: true)
FontExtensionGenerator.writeExtensionFile(fontsNames: fontsNames,
staticVar: options.staticMembers,
extensionName: options.extensionNameSwiftUI,
extensionFilePath: options.extensionFilePathSwiftUI,
isSwiftUI: true)
extensionName: options.extensionNameUIKit,
extensionFilePath: options.extensionFilePathUIKit,
isSwiftUI: false)
print("Info.plist has been updated with:")
print("\(FontPlistGenerator.generatePlistUIAppsFontContent(for: fontsNames, infoPlistPaths: options.infoPlistPaths))")
@ -79,7 +79,7 @@ struct Fonts: ParsableCommand {
}
// Extension for UIKit and SwiftUI should have different name
guard options.extensionName != options.extensionNameSwiftUI else {
guard options.extensionName != options.extensionNameUIKit else {
let error = FontsToolError.extensionNamesCollision(options.extensionName)
print(error.description)
Fonts.exit(withError: error)