27 lines
661 B
Swift
27 lines
661 B
Swift
import ArgumentParser
|
|
import DoxyLibrary
|
|
|
|
/// A command type that runs the service based on given of set of option parameters.
|
|
@main struct Doxy: AsyncParsableCommand {
|
|
|
|
// MARK: Properties
|
|
|
|
/// An option type that contains all the possible parameters that can be provided to the service.
|
|
@OptionGroup var options: Options
|
|
|
|
// MARK: Functions
|
|
|
|
/// Runs the service.
|
|
mutating func run() async throws {
|
|
let appBuilder = AppBuilder(
|
|
name: options.name,
|
|
archivesPath: options.archivesPath
|
|
)
|
|
|
|
let app = try await appBuilder(options)
|
|
|
|
try await app.runService()
|
|
}
|
|
|
|
}
|