Created the basis of the Create command in the executable target.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import ArgumentParser
|
||||
import ColibriLibrary
|
||||
|
||||
@main
|
||||
struct Colibri: AsyncParsableCommand {
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
func run() async throws {
|
||||
// ...
|
||||
}
|
||||
// MARK: Properties
|
||||
|
||||
static let configuration = CommandConfiguration(
|
||||
abstract: "The utility to manage your Hummingbird projects",
|
||||
subcommands: [Create.self]
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import ArgumentParser
|
||||
import ColibriLibrary
|
||||
|
||||
extension Colibri {
|
||||
struct Create: AsyncParsableCommand {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
static let configuration = CommandConfiguration(
|
||||
commandName: "create project",
|
||||
abstract: "Create a new, tailored Colibri project.",
|
||||
helpNames: .shortAndLong,
|
||||
aliases: ["create"]
|
||||
)
|
||||
|
||||
@OptionGroup var options: Options
|
||||
|
||||
// MARK: Functions
|
||||
|
||||
mutating func run() async throws {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Options
|
||||
|
||||
extension Colibri.Create {
|
||||
struct Options: ParsableArguments {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
@Option(name: .shortAndLong)
|
||||
var name: String
|
||||
|
||||
@Option(name: .shortAndLong)
|
||||
var location: String?
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user