-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPackage.swift
107 lines (103 loc) · 3.35 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
107
// swift-tools-version:6.0.3
import PackageDescription
let package = Package(
name: "portfolio",
platforms: [
.macOS(.v13),
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"),
.package(url: "https://github.com/erikbdev/swift-web.git", exact: "0.0.11"),
.package(url: "https://github.com/hummingbird-project/hummingbird.git", exact: "2.5.0"),
.package(url: "https://github.com/pointfreeco/swift-case-paths.git", from: "1.0.0"),
.package(url: "https://github.com/pointfreeco/swift-url-routing.git", from: "0.6.2"),
.package(url: "https://github.com/pointfreeco/swift-dependencies.git", from: "1.6.2")
],
targets: [
.target(
name: "EnvVars",
dependencies: [
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "Dependencies", package: "swift-dependencies")
]
),
.target(
name: "PublicAssets",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "DependenciesMacros", package: "swift-dependencies"),
],
resources: [.copy("assets")],
plugins: [.plugin(name: "TypedAssetsPlugin", package: "swift-web")]
),
.target(
name: "Models",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
]
),
.target(
name: "ActivityClient",
dependencies: [
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "DependenciesMacros", package: "swift-dependencies"),
]
),
.target(
name: "Routes",
dependencies: [
"Models",
"ActivityClient",
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "HummingbirdRouter", package: "hummingbird"),
.product(name: "URLRouting", package: "swift-url-routing"),
.product(name: "HummingbirdURLRouting", package: "swift-web"),
.product(name: "CasePaths", package: "swift-case-paths")
]
),
.target(
name: "Pages",
dependencies: [
"EnvVars",
"Models",
"ActivityClient",
"PublicAssets",
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "HTML", package: "swift-web"),
.product(name: "Vue", package: "swift-web"),
.product(name: "Hummingbird", package: "hummingbird")
]
),
/// Executable
.executableTarget(
name: "App",
dependencies: [
"EnvVars",
"Models",
"Routes",
"Pages",
"ActivityClient",
"PublicAssets",
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "Hummingbird", package: "hummingbird"),
.product(name: "HummingbirdRouter", package: "hummingbird"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.product(name: "MiddlewareUtils", package: "swift-web")
]
),
],
swiftLanguageModes: [.v6]
)
package.targets
.filter { $0.type != .binary && $0.type != .plugin }
.forEach {
$0.swiftSettings = [
.unsafeFlags([
"-Xfrontend",
"-warn-long-function-bodies=500",
"-Xfrontend",
"-warn-long-expression-type-checking=250"
])
]
}