-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
75 lines (74 loc) · 2.38 KB
/
Copy pathPackage.swift
File metadata and controls
75 lines (74 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "swift-cli-docs-plugin",
platforms: [
.macOS(.v12),
],
products: [
.plugin(
name: "SwiftCLIDocsPlugin",
targets: ["SwiftCLIDocsPlugin"]
),
.executable(
name: "swift-cli-docs",
targets: ["swift-cli-docs"]
),
.library(
name: "CLIDocsCore",
targets: ["CLIDocsCore"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
.package(url: "https://github.com/jpsim/Yams", from: "5.1.0"),
.package(url: "https://github.com/stencilproject/Stencil", from: "0.15.1"),
.package(url: "https://github.com/kylef/PathKit", from: "1.0.1"),
],
targets: [
.plugin(
name: "SwiftCLIDocsPlugin",
capability: .command(
intent: .custom(
verb: "generate-docs",
description: "Generate Markdown documentation for Swift Argument Parser CLI tools."
),
permissions: [
.writeToPackageDirectory(reason: "Writes generated Markdown documentation to the configured output directory."),
]
),
dependencies: [
.target(name: "swift-cli-docs"),
],
path: "Plugins/SwiftCLIDocsPlugin"
),
.executableTarget(
name: "swift-cli-docs",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.target(name: "CLIDocsCore"),
],
path: "Sources/swift-cli-docs"
),
.target(
name: "CLIDocsCore",
dependencies: [
.product(name: "Yams", package: "Yams"),
.product(name: "Stencil", package: "Stencil"),
.product(name: "PathKit", package: "PathKit"),
],
path: "Sources/CLIDocsCore",
resources: [
.copy("Resources/Themes"),
]
),
.testTarget(
name: "CLIDocsCoreTests",
dependencies: ["CLIDocsCore"],
path: "Tests/CLIDocsCoreTests",
resources: [
.copy("Fixtures"),
]
),
]
)