Added the "ArgumentParser" package dependency to the sample target in the Package file.

This commit is contained in:
2025-09-27 18:51:48 +02:00
parent f41537274c
commit e076e4fa80
+10 -2
View File
@@ -18,6 +18,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"),
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"),
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"),
],
@@ -33,9 +34,16 @@ let package = Package(
.target(
name: DocCMiddleware.sample,
dependencies: [
.byName(name: DocCMiddleware.target)
.byName(name: DocCMiddleware.target),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
path: "Samples/DocCMiddleware"
path: "Samples/DocCMiddleware",
swiftSettings: [
// Enable better optimizations when building in Release configuration. Despite the use of
// the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release
// builds. See <https://github.com/swift-server/guides#building-for-production> for details.
.unsafeFlags(["-cross-module-optimization"], .when(configuration: .release)),
]
),
.testTarget(
name: DocCMiddleware.test,