Files
resgen.swift/Sources/ResgenSwift/Generate/GenerateOptions.swift
Thibaut Schmitt e9bc779da6
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Add --project-directory option to generate command to easily use relative path
2022-08-31 16:42:22 +02:00

29 lines
719 B
Swift

//
// GenerateOptions.swift
//
//
// Created by Thibaut Schmitt on 30/08/2022.
//
import Foundation
import Foundation
import ArgumentParser
struct GenerateOptions: ParsableArguments {
@Flag(name: [.customShort("f"), .customShort("F")], help: "Should force generation")
var forceGeneration = false
@Argument(help: "Configuration file.", transform: { $0.replaceTiltWithHomeDirectoryPath() })
var configurationFile: String
@Option(help: "Project directory. It will be added to every relative path (path that does not start with `/`",
transform: {
if $0.last == "/" {
return $0
}
return $0 + "/"
})
var projectDirectory: String
}