36 lines
1.3 KiB
Swift
36 lines
1.3 KiB
Swift
//
|
|
// StringiumOptions.swift
|
|
//
|
|
//
|
|
// Created by Thibaut Schmitt on 10/01/2022.
|
|
//
|
|
|
|
import Foundation
|
|
import ArgumentParser
|
|
|
|
struct StringiumOptions: ParsableArguments {
|
|
@Flag(name: [.customShort("f"), .customShort("F")], help: "Should force generation")
|
|
var forceGeneration = false
|
|
|
|
@Argument(help: "Input files where strings ared defined.", transform: { $0.replaceTiltWithHomeDirectoryPath() })
|
|
var inputFile: String
|
|
|
|
@Option(name: .customLong("output-path"), help: "Path where to strings file.", transform: { $0.replaceTiltWithHomeDirectoryPath() })
|
|
var outputPathRaw: String
|
|
|
|
@Option(name: .customLong("langs"), help: "Langs to generate.")
|
|
var langsRaw: String
|
|
|
|
@Option(help: "Default langs.")
|
|
var defaultLang: 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 String extension. Using default extension name will generate static property.")
|
|
var extensionName: String = Stringium.defaultExtensionName
|
|
|
|
@Option(help: "Extension suffix. Ex: MyApp, it will generate {extensionName}+String{extensionSuffix}.swift")
|
|
var extensionSuffix: String = ""
|
|
}
|