-
Notifications
You must be signed in to change notification settings - Fork 52
/
Package.swift
82 lines (77 loc) · 2.59 KB
/
Package.swift
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
76
77
78
79
80
81
82
// swift-tools-version:5.7
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
import Foundation
import PackageDescription
let package = Package(
name: "SwiftDocCPlugin",
platforms: [
.macOS("10.15.4"),
],
products: [
.plugin(name: "Swift-DocC", targets: ["Swift-DocC"]),
.plugin(name: "Swift-DocC Preview", targets: ["Swift-DocC Preview"]),
],
dependencies: [
.package(url: "https://github.com/swiftlang/swift-docc-symbolkit", from: "1.0.0"),
],
targets: [
.plugin(
name: "Swift-DocC",
capability: .command(
intent: .documentationGeneration()
),
dependencies: [
"snippet-extract",
],
path: "Plugins/Swift-DocC Convert",
exclude: ["Symbolic Links/README.md"]
),
.plugin(
name: "Swift-DocC Preview",
capability: .command(
intent: .custom(
verb: "preview-documentation",
description: "Preview the Swift-DocC documentation for a specified target."
)
),
dependencies: [
"snippet-extract",
],
exclude: ["Symbolic Links/README.md"]
),
.target(name: "SwiftDocCPluginUtilities"),
.testTarget(
name: "SwiftDocCPluginUtilitiesTests",
dependencies: [
"Snippets",
"SwiftDocCPluginUtilities",
"snippet-extract",
],
resources: [
.copy("Test Fixtures"),
]
),
// Empty target that builds the DocC catalog at /SwiftDocCPluginDocumentation/SwiftDocCPlugin.docc.
// The SwiftDocCPlugin catalog includes high-level, user-facing documentation about using
// the Swift-DocC plugin from the command-line.
.target(
name: "SwiftDocCPlugin",
path: "Sources/SwiftDocCPluginDocumentation",
exclude: ["README.md"]
),
.target(name: "Snippets"),
.executableTarget(
name: "snippet-extract",
dependencies: [
"Snippets",
.product(name: "SymbolKit", package: "swift-docc-symbolkit"),
]),
]
)