diff --git a/Sources/Executable/Commands/Create.swift b/Sources/Executable/Commands/Create.swift index a8d4373..556fcb7 100644 --- a/Sources/Executable/Commands/Create.swift +++ b/Sources/Executable/Commands/Create.swift @@ -1,6 +1,5 @@ import ArgumentParser import ColibriLibrary -import Foundation extension Colibri { struct Create: AsyncParsableCommand { @@ -32,25 +31,3 @@ extension Colibri { } } - -// MARK: - Options - -extension Colibri.Create { - struct Options: ParsableArguments { - - // MARK: Properties - - @Option(name: .shortAndLong) - var name: String - - @Option(name: .shortAndLong) - var location: String? - - // MARK: Computed - - var locationURL: URL? { - location.flatMap { URL(fileURLWithPath: $0) } - } - - } -} diff --git a/Sources/Executable/Options/CreateOptions.swift b/Sources/Executable/Options/CreateOptions.swift new file mode 100644 index 0000000..8050ea8 --- /dev/null +++ b/Sources/Executable/Options/CreateOptions.swift @@ -0,0 +1,22 @@ +import ArgumentParser +import Foundation + +extension Colibri.Create { + struct Options: ParsableArguments { + + // MARK: Properties + + @Option(name: .shortAndLong) + var name: String + + @Option(name: .shortAndLong) + var location: String? + + // MARK: Computed + + var locationURL: URL? { + location.flatMap { URL(fileURLWithPath: $0) } + } + + } +}