This commit is contained in:
24
Sources/hpa/GenerateCommands/GenerateHtmlCommand.swift
Normal file
24
Sources/hpa/GenerateCommands/GenerateHtmlCommand.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
import ArgumentParser
|
||||
import Dependencies
|
||||
import PandocClient
|
||||
|
||||
// TODO: Need to add a step to build prior to generating file.
|
||||
struct GenerateHtmlCommand: AsyncParsableCommand {
|
||||
static let commandName = "html"
|
||||
|
||||
static let configuration = CommandConfiguration(
|
||||
commandName: commandName
|
||||
)
|
||||
|
||||
@OptionGroup var globals: GenerateOptions
|
||||
|
||||
mutating func run() async throws {
|
||||
@Dependency(\.pandocClient) var pandocClient
|
||||
|
||||
let output = try await pandocClient.run.generateHtml(
|
||||
globals.pandocRunOptions(commandName: Self.commandName)
|
||||
)
|
||||
print(output)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user