Created the library and test targets as well as the executable and library products for the Package file.

This commit is contained in:
Javier Cicchelli 2025-01-11 00:06:58 +01:00
parent 3e8e321c73
commit ecbec1f4c8
4 changed files with 35 additions and 5 deletions

View File

@ -4,18 +4,43 @@ 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")
.package(
url: "https://github.com/apple/swift-argument-parser",
from: "1.0.0"
)
],
targets: [
.executableTarget(
name: "Colibri",
dependencies: [
.product(name: "ArgumentParser",
package: "swift-argument-parser")
.product(
name: "ArgumentParser",
package: "swift-argument-parser"
),
.target(name: "ColibriLibrary")
],
path: "Sources"
path: "Sources/Executable"
),
.target(
name: "ColibriLibrary",
dependencies: [],
path: "Sources/Library"
),
.testTarget(
name: "ColibriTests",
dependencies: ["ColibriLibrary"],
path: "Tests/Library"
)
]
)

View File

@ -1,4 +1,5 @@
import ArgumentParser
import ColibriLibrary
@main
struct Colibri: AsyncParsableCommand {

View File

@ -0,0 +1 @@
import Foundation

View File

@ -0,0 +1,3 @@
import Testing
struct ColibriLibraryTests {}