-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
106 lines (98 loc) · 2.99 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
import CompilerPluginSupport
let package = Package(
name: "StorybookComposer",
platforms: [
.macOS(.v13),
.iOS(.v16),
.tvOS(.v16),
.watchOS(.v9),
.macCatalyst(.v16)
],
products: [
.library(
name: "StorybookComposer",
targets: ["StorybookComposer"]
),
.plugin(
name: "StorybookComposerPlugin",
targets: ["StorybookComposerPlugin"]
),
.executable(
name: "StorybookComposerGenerator",
targets: ["StorybookComposerGenerator"]
)
],
dependencies: [
.package(
url: "https://github.com/apple/swift-syntax.git",
from: "509.0.0-swift-5.9-DEVELOPMENT-SNAPSHOT-2023-09-05-a"
),
.package(
url: "https://github.com/apple/swift-argument-parser",
from: "1.2.0"
)
],
targets: [
.target(
name: "StorybookComposer",
dependencies: [
"StorybookComposerMacrosPlugin"
]
),
// ---
.target(
name: "StorybookComposerMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax")
]
),
.macro(
name: "StorybookComposerMacrosPlugin",
dependencies: [
"StorybookComposerMacros"
]
),
.testTarget(
name: "StorybookComposerMacrosTests",
dependencies: [
"StorybookComposerMacros",
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax")
]
),
// ---
.executableTarget(
name: "StorybookComposerGenerator",
dependencies: [
"StorybookComposerMacros",
.product(name: "SwiftSyntaxMacroExpansion", package: "swift-syntax"),
.product(name: "ArgumentParser", package: "swift-argument-parser")
]
),
.binaryTarget(
name: "StorybookComposerGeneratorTool",
path: "Tools/StorybookComposerGenerator.artifactbundle"
),
.testTarget(
name: "StorybookComposerGeneratorTests",
dependencies: [
"StorybookComposerGenerator",
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax")
]
),
// ---
.plugin(
name: "StorybookComposerPlugin",
capability: .buildTool(),
dependencies: [
.target(
name: "StorybookComposerGeneratorTool",
condition: .when(platforms: [.macOS])
)
]
)
]
)