feat(RES-34): Fix plist font filename (#14)
All checks were successful
gitea-openium/resgen.swift/pipeline/head This commit looks good
All checks were successful
gitea-openium/resgen.swift/pipeline/head This commit looks good
Reviewed-on: #14
This commit is contained in:
@ -5,13 +5,14 @@
|
||||
// Created by Thibaut Schmitt on 29/08/2022.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import ArgumentParser
|
||||
import Foundation
|
||||
|
||||
enum ColorStyle: String, Decodable, ExpressibleByArgument {
|
||||
|
||||
case light
|
||||
case all
|
||||
|
||||
|
||||
static var allValueStrings: [String] {
|
||||
[
|
||||
Self.light.rawValue,
|
||||
|
@ -8,28 +8,29 @@
|
||||
import Foundation
|
||||
|
||||
struct ParsedColor {
|
||||
|
||||
let name: String
|
||||
let light: String
|
||||
let dark: String
|
||||
|
||||
|
||||
// Generate Contents.json content
|
||||
func contentsJSON() -> String {
|
||||
let lightARGB = light.colorComponent()
|
||||
let darkARGB = dark.colorComponent()
|
||||
|
||||
|
||||
let allComponents = [
|
||||
lightARGB.alpha, lightARGB.red, lightARGB.green, lightARGB.blue,
|
||||
darkARGB.alpha, darkARGB.red, darkARGB.green, darkARGB.blue
|
||||
].map {
|
||||
$0.isEmpty
|
||||
}
|
||||
|
||||
|
||||
guard allComponents.contains(true) == false else {
|
||||
let error = ColorsToolError.badColorDefinition(light, dark)
|
||||
print(error.description)
|
||||
Colors.exit(withError: error)
|
||||
}
|
||||
|
||||
|
||||
return """
|
||||
{
|
||||
"colors": [
|
||||
@ -71,9 +72,9 @@ struct ParsedColor {
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
||||
|
||||
// MARK: - UIKit
|
||||
|
||||
|
||||
func getColorProperty(isStatic: Bool, isSwiftUI: Bool) -> String {
|
||||
if isSwiftUI {
|
||||
return """
|
||||
|
Reference in New Issue
Block a user