@@ -5,17 +5,35 @@ import PackageDescription
55
66extension String {
77 static let html : Self = " HTML "
8+ static let htmlTheme : Self = " HTMLTheme "
9+ static let htmlComponents : Self = " HTMLComponents "
10+ static let htmlMarkdown : Self = " HTMLMarkdown "
11+ static let htmlEmail : Self = " HTMLEmail "
12+ static let htmlWebsite : Self = " HTMLWebsite "
13+ static let htmlKit : Self = " HTMLKit "
814}
915
1016extension Target . Dependency {
1117 static var html : Self { . target( name: . html) }
18+ static var htmlTheme : Self { . target( name: . htmlTheme) }
19+ static var htmlComponents : Self { . target( name: . htmlComponents) }
20+ static var htmlMarkdown : Self { . target( name: . htmlMarkdown) }
21+ static var htmlEmail : Self { . target( name: . htmlEmail) }
22+ static var htmlWebsite : Self { . target( name: . htmlWebsite) }
1223}
1324
1425extension Target . Dependency {
1526 static var htmlTypesFoundation : Self { . product( name: " HTMLTypesFoundation " , package : " swift-html-types " ) }
1627 static var pointFreeHtmlTestSupport : Self { . product( name: " PointFreeHTMLTestSupport " , package : " pointfree-html " ) }
1728 static var htmlCssPointFreeHTML : Self { . product( name: " HTMLCSSPointFreeHTML " , package : " swift-html-css-pointfree " ) }
1829 static var stringBuilder : Self { . product( name: " StringBuilder " , package : " swift-builders " ) }
30+ static var dependencies : Self { . product( name: " Dependencies " , package : " swift-dependencies " ) }
31+ static var swiftMarkdown : Self { . product( name: " Markdown " , package : " swift-markdown " ) }
32+ static var markdownBuilder : Self { . product( name: " MarkdownBuilder " , package : " swift-builders " ) }
33+ static var orderedCollections : Self { . product( name: " OrderedCollections " , package : " swift-collections " ) }
34+ static var translating : Self { . product( name: " Translating " , package : " swift-translating " ) }
35+ static var htmlTranslating : Self { . product( name: " PointFreeHTMLTranslating " , package : " pointfree-html-translating " ) }
36+ static var builders : Self { . product( name: " Builders " , package : " swift-builders " ) }
1937}
2038
2139let package = Package (
@@ -25,24 +43,92 @@ let package = Package(
2543 . macOS( . v14) ,
2644 . tvOS( . v17) ,
2745 . watchOS( . v10) ,
28- . macCatalyst( . v17) ,
46+ . macCatalyst( . v17)
2947 ] ,
3048 products: [
31- . library( name: . html, targets: [ . html] )
49+ // Individual targets
50+ . library( name: . html, targets: [ . html] ) ,
51+ . library( name: . htmlTheme, targets: [ . htmlTheme] ) ,
52+ . library( name: . htmlComponents, targets: [ . htmlComponents] ) ,
53+ . library( name: . htmlMarkdown, targets: [ . htmlMarkdown] ) ,
54+ . library( name: . htmlEmail, targets: [ . htmlEmail] ) ,
55+ . library( name: . htmlWebsite, targets: [ . htmlWebsite] ) ,
56+
57+ // Convenience product with common features
58+ . library( name: . htmlKit, targets: [ . html, . htmlTheme, . htmlComponents] )
3259 ] ,
3360 dependencies: [
3461 . package ( url: " https://github.com/coenttb/swift-html-css-pointfree " , from: " 0.0.1 " ) ,
3562 . package ( url: " https://github.com/coenttb/swift-html-types " , from: " 0.1.0 " ) ,
3663 . package ( url: " https://github.com/coenttb/pointfree-html " , from: " 2.0.0 " ) ,
37- . package ( url: " https://github.com/coenttb/swift-builders " , from: " 0.0.1 " )
64+ . package ( url: " https://github.com/coenttb/pointfree-html-translating " , from: " 0.0.1 " ) ,
65+ . package ( url: " https://github.com/coenttb/swift-builders " , from: " 0.0.1 " ) ,
66+ . package ( url: " https://github.com/coenttb/swift-translating " , from: " 0.0.1 " ) ,
67+ . package ( url: " https://github.com/pointfreeco/swift-dependencies " , from: " 1.9.2 " ) ,
68+ . package ( url: " https://github.com/swiftlang/swift-markdown " , from: " 0.4.0 " ) ,
69+ . package ( url: " https://github.com/apple/swift-collections " , from: " 1.1.2 " )
3870 ] ,
3971 targets: [
4072 . target(
4173 name: . html,
4274 dependencies: [
4375 . htmlCssPointFreeHTML,
4476 . htmlTypesFoundation,
45- . stringBuilder
77+ . stringBuilder,
78+ . dependencies,
79+ . orderedCollections,
80+ . htmlTranslating,
81+ . builders
82+ ]
83+ ) ,
84+ . target(
85+ name: . htmlTheme,
86+ dependencies: [
87+ . html,
88+ . dependencies
89+ ]
90+ ) ,
91+ . target(
92+ name: . htmlWebsite,
93+ dependencies: [
94+ . html,
95+ . htmlComponents,
96+ . htmlMarkdown,
97+ . htmlTheme,
98+ . dependencies
99+ ]
100+ ) ,
101+ . target(
102+ name: . htmlComponents,
103+ dependencies: [
104+ . html,
105+ . htmlTheme,
106+ . dependencies,
107+ . orderedCollections,
108+ . htmlTranslating
109+ ]
110+ ) ,
111+ . target(
112+ name: . htmlMarkdown,
113+ dependencies: [
114+ . html,
115+ . htmlTheme,
116+ . swiftMarkdown,
117+ . markdownBuilder,
118+ . dependencies,
119+ . orderedCollections
120+ ]
121+ ) ,
122+ . target(
123+ name: . htmlEmail,
124+ dependencies: [
125+ . html,
126+ . htmlTheme,
127+ . htmlComponents,
128+ . htmlMarkdown,
129+ . dependencies,
130+ . orderedCollections,
131+ . translating
46132 ]
47133 ) ,
48134 . testTarget(
@@ -51,6 +137,34 @@ let package = Package(
51137 . html,
52138 . pointFreeHtmlTestSupport
53139 ]
140+ ) ,
141+ . testTarget(
142+ name: . htmlTheme. tests,
143+ dependencies: [
144+ . htmlTheme,
145+ . pointFreeHtmlTestSupport
146+ ]
147+ ) ,
148+ . testTarget(
149+ name: . htmlComponents. tests,
150+ dependencies: [
151+ . htmlComponents,
152+ . pointFreeHtmlTestSupport
153+ ]
154+ ) ,
155+ . testTarget(
156+ name: . htmlMarkdown. tests,
157+ dependencies: [
158+ . htmlMarkdown,
159+ . pointFreeHtmlTestSupport
160+ ]
161+ ) ,
162+ . testTarget(
163+ name: . htmlEmail. tests,
164+ dependencies: [
165+ . htmlEmail,
166+ . pointFreeHtmlTestSupport
167+ ]
54168 )
55169 ] ,
56170 swiftLanguageModes: [ . v6]
0 commit comments