diff --git a/Package.swift b/Package.swift index 80334c3..5026c61 100644 --- a/Package.swift +++ b/Package.swift @@ -1,14 +1,46 @@ // swift-tools-version: 6.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "Colibri", + products: [ + .executable( + name: "colibri", + targets: ["Colibri"] + ), + .library( + name: "ColibriLibrary", + targets: ["ColibriLibrary"] + ) + ], + dependencies: [ + .package( + url: "https://github.com/apple/swift-argument-parser", + from: "1.0.0" + ) + ], targets: [ - // Targets are the basic building blocks of a package, defining a module or a test suite. - // Targets can depend on other targets in this package and products from dependencies. .executableTarget( - name: "Colibri"), + name: "Colibri", + dependencies: [ + .product( + name: "ArgumentParser", + package: "swift-argument-parser" + ), + .target(name: "ColibriLibrary") + ], + path: "Sources/Executable" + ), + .target( + name: "ColibriLibrary", + dependencies: [], + path: "Sources/Library" + ), + .testTarget( + name: "ColibriTests", + dependencies: ["ColibriLibrary"], + path: "Tests/Library" + ) ] ) diff --git a/Sources/Executable/Colibri.swift b/Sources/Executable/Colibri.swift new file mode 100644 index 0000000..02690d1 --- /dev/null +++ b/Sources/Executable/Colibri.swift @@ -0,0 +1,13 @@ +import ArgumentParser +import ColibriLibrary + +@main +struct Colibri: AsyncParsableCommand { + + // MARK: Functions + + func run() async throws { + // ... + } + +} diff --git a/Sources/Library/ColibriLibrary.swift b/Sources/Library/ColibriLibrary.swift new file mode 100644 index 0000000..fecc4ab --- /dev/null +++ b/Sources/Library/ColibriLibrary.swift @@ -0,0 +1 @@ +import Foundation diff --git a/Sources/main.swift b/Sources/main.swift deleted file mode 100644 index 44e20d5..0000000 --- a/Sources/main.swift +++ /dev/null @@ -1,4 +0,0 @@ -// The Swift Programming Language -// https://docs.swift.org/swift-book - -print("Hello, world!") diff --git a/Tests/Library/ColibriLibraryTests.swift b/Tests/Library/ColibriLibraryTests.swift new file mode 100644 index 0000000..5cfd2da --- /dev/null +++ b/Tests/Library/ColibriLibraryTests.swift @@ -0,0 +1,3 @@ +import Testing + +struct ColibriLibraryTests {}