This commit is contained in:
@@ -9,7 +9,8 @@ struct Application: ParsableCommand {
|
||||
subcommands: [
|
||||
SectionCommand.self,
|
||||
VStackCommand.self,
|
||||
HStackCommand.self
|
||||
HStackCommand.self,
|
||||
GroupCommand.self
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
21
Examples/Sources/CliDoc-Examples/GroupCommand.swift
Normal file
21
Examples/Sources/CliDoc-Examples/GroupCommand.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
import ArgumentParser
|
||||
import CliDocCore
|
||||
|
||||
struct GroupCommand: ParsableCommand {
|
||||
|
||||
static let configuration = CommandConfiguration(commandName: "group")
|
||||
|
||||
func run() throws {
|
||||
let group = Group {
|
||||
"My headline."
|
||||
"\n"
|
||||
"Some content".color(.green)
|
||||
"\n"
|
||||
"Foo Bar".italic()
|
||||
}
|
||||
.color(.blue)
|
||||
|
||||
print()
|
||||
print("\(group.render())")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user