feat: Adds stack separators, removes some unused nodes from cli-doc module
All checks were successful
CI / Run tests. (push) Successful in 52s
All checks were successful
CI / Run tests. (push) Successful in 52s
This commit is contained in:
@@ -33,4 +33,66 @@ public extension CommandConfiguration {
|
||||
aliases: aliases
|
||||
)
|
||||
}
|
||||
|
||||
/// Generate a new command configuration, using ``TextNode``'s for the usage, and discussion parameters.
|
||||
///
|
||||
///
|
||||
init<U: TextNode, D: TextNode>(
|
||||
commandName: String? = nil,
|
||||
abstract: String = "",
|
||||
usage: Usage<U>,
|
||||
discussion: Discussion<D>,
|
||||
version: String = "",
|
||||
shouldDisplay: Bool = true,
|
||||
subcommands ungroupedSubcommands: [ParsableCommand.Type] = [],
|
||||
groupedSubcommands: [CommandGroup] = [],
|
||||
defaultSubcommand: ParsableCommand.Type? = nil,
|
||||
helpNames: NameSpecification? = nil,
|
||||
aliases: [String] = []
|
||||
) {
|
||||
self.init(
|
||||
commandName: commandName,
|
||||
abstract: abstract,
|
||||
usage: usage.render(),
|
||||
discussion: discussion.render(),
|
||||
version: version,
|
||||
shouldDisplay: shouldDisplay,
|
||||
subcommands: ungroupedSubcommands,
|
||||
groupedSubcommands: groupedSubcommands,
|
||||
defaultSubcommand: defaultSubcommand,
|
||||
helpNames: helpNames,
|
||||
aliases: aliases
|
||||
)
|
||||
}
|
||||
|
||||
/// Generate a new command configuration, using ``TextNode``'s for the discussion parameter.
|
||||
///
|
||||
///
|
||||
init<D: TextNode>(
|
||||
commandName: String? = nil,
|
||||
abstract: String = "",
|
||||
usage: String? = nil,
|
||||
discussion: Discussion<D>,
|
||||
version: String = "",
|
||||
shouldDisplay: Bool = true,
|
||||
subcommands ungroupedSubcommands: [ParsableCommand.Type] = [],
|
||||
groupedSubcommands: [CommandGroup] = [],
|
||||
defaultSubcommand: ParsableCommand.Type? = nil,
|
||||
helpNames: NameSpecification? = nil,
|
||||
aliases: [String] = []
|
||||
) {
|
||||
self.init(
|
||||
commandName: commandName,
|
||||
abstract: abstract,
|
||||
usage: usage,
|
||||
discussion: discussion.render(),
|
||||
version: version,
|
||||
shouldDisplay: shouldDisplay,
|
||||
subcommands: ungroupedSubcommands,
|
||||
groupedSubcommands: groupedSubcommands,
|
||||
defaultSubcommand: defaultSubcommand,
|
||||
helpNames: helpNames,
|
||||
aliases: aliases
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user