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( let package = Package(
name: "Colibri", name: "Colibri",
products: [
.executable(
name: "colibri",
targets: ["Colibri"]
),
.library(
name: "ColibriLibrary",
targets: ["ColibriLibrary"]
)
],
dependencies: [ dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", .package(
from: "1.0.0") url: "https://github.com/apple/swift-argument-parser",
from: "1.0.0"
)
], ],
targets: [ targets: [
.executableTarget( .executableTarget(
name: "Colibri", name: "Colibri",
dependencies: [ dependencies: [
.product(name: "ArgumentParser", .product(
package: "swift-argument-parser") 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 ArgumentParser
import ColibriLibrary
@main @main
struct Colibri: AsyncParsableCommand { struct Colibri: AsyncParsableCommand {

View File

@ -0,0 +1 @@
import Foundation

View File

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