Optional generation of extension (R.xx)

Optional generation of Colors/Fonts/Images/Stringium extension

Fix swiftlint warning
This commit is contained in:
2025-07-17 09:39:43 +02:00
parent c3b8ebfb37
commit 3092376b65
34 changed files with 973 additions and 688 deletions

View File

@ -18,12 +18,13 @@ enum ImagesError: Error {
case magickConvertNotFound
case writeFile(String, String)
case createAssetFolder(String)
case missingExtensionPath
case unknown(String)
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: [\(Images.toolName)] Error on extension names, extension name and SwiftUI extension name should be different (\(extensionName) is used on both)"
case .inputFolderNotFound(let inputFolder):
return "error: [\(Images.toolName)] Input folder not found: \(inputFolder)"
@ -47,7 +48,10 @@ enum ImagesError: Error {
return "error: [\(Images.toolName)] An error occured while writing content to \(filename): \(subErrorDescription)"
case .createAssetFolder(let folder):
return "error: [\(Colors.toolName)] An error occured while creating folder `\(folder)`"
return "error: [\(Images.toolName)] An error occured while creating folder `\(folder)`"
case .missingExtensionPath:
return "error: [\(Images.toolName)] Extension need to be generated but no `extensionOutputPath` is provided"
case .unknown(let errorDescription):
return "error: [\(Images.toolName)] Unknown error: \(errorDescription)"