doxy/App/Sources/App.swift

27 lines
661 B
Swift
Raw Normal View History

2025-02-22 10:21:07 +01:00
import ArgumentParser
import DoxyLibrary
2025-02-22 10:21:07 +01:00
/// A command type that runs the service based on given of set of option parameters.
@main struct Doxy: AsyncParsableCommand {
2025-02-22 10:21:07 +01:00
// MARK: Properties
/// An option type that contains all the possible parameters that can be provided to the service.
2025-02-22 10:21:07 +01:00
@OptionGroup var options: Options
// MARK: Functions
/// Runs the service.
2025-02-22 10:21:07 +01:00
mutating func run() async throws {
let appBuilder = AppBuilder(
name: options.name,
archivesPath: options.archivesPath
)
let app = try await appBuilder(options)
2025-02-22 10:21:07 +01:00
try await app.runService()
}
}