diff --git a/App/Sources/App.swift b/App/Sources/App.swift index 7b2e783..686d24f 100644 --- a/App/Sources/App.swift +++ b/App/Sources/App.swift @@ -1,14 +1,17 @@ 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, diff --git a/App/Sources/Options/AppOptions.swift b/App/Sources/Options/AppOptions.swift index 80db7d7..3bd38d8 100644 --- a/App/Sources/Options/AppOptions.swift +++ b/App/Sources/Options/AppOptions.swift @@ -3,34 +3,40 @@ import DoxyLibrary import Logging extension Doxy { + /// An option type that contains all the possible parameters that can be provided to the application. struct Options: AppArguments, ParsableArguments { // MARK: Properties - + + /// A path to the location of the DocC archives in the local file system. @Option( name: .shortAndLong, - help: "A path to the location of the DocC archives in the local file system." + help: "A path to the location of the DocC archives in the local file system. Defaults to `Resources/Archives`." ) var archivesPath: String = "Resources/Archives" - + + /// A hostname to bind the application to. @Option( name: .shortAndLong, help: "A hostname to bind the application to. Defaults to `127.0.0.1`." ) var hostname: String = "127.0.0.1" + /// A log level to set the logger service in the application. @Option( name: .shortAndLong, help: "A log level to set the logger service in the application." ) var logLevel: Logger.Level? - + + /// A name for the Hummingbird application. @Option( name: .shortAndLong, - help: "A name for the Hummingbird application." + help: "A name for the Hummingbird application. Defaults to `Doxy`." ) var name: String = "Doxy" + /// A port number to bind the application to. @Option( name: .shortAndLong, help: "A port number to bind the application to. Defaults to `8080`."