Repository navigation
Expand file tree
/
Copy pathPackage.swift
More file actions
58 lines (57 loc) · 2.18 KB
/
Copy pathPackage.swift
File metadata and controls
58 lines (57 loc) · 2.18 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
// swift-tools-version: 5.9
import PackageDescription
// MarkdownEngine — a TextKit-2 backed Markdown editor view for macOS.
//
// Embedders import `MarkdownEngine` and supply their own adapters that
// conform to the engine's service protocols (`WikiLinkResolver`,
// `EmbeddedImageProvider`, `SyntaxHighlighter`, `LatexRenderer`). The engine
// itself has zero external dependencies.
//
// Users who want turnkey adapters for the two highest-friction protocols
// (code-block styling/highlighting, LaTeX rendering) can additionally
// depend on the `MarkdownEngineCodeBlocks` and/or `MarkdownEngineLatex`
// products, which ship pre-built bridges backed by a bundled highlight.js
// and SwiftMath respectively. Both products are opt-in: the core
// `MarkdownEngine` library stays free of them at link time.
let package = Package(
name: "MarkdownEngine",
platforms: [.macOS(.v14)],
products: [
.library(name: "MarkdownEngine", targets: ["MarkdownEngine"]),
.library(name: "MarkdownEngineCodeBlocks", targets: ["MarkdownEngineCodeBlocks"]),
.library(name: "MarkdownEngineLatex", targets: ["MarkdownEngineLatex"]),
],
dependencies: [
.package(url: "https://github.com/mgriebling/SwiftMath", from: "1.7.0"),
],
targets: [
.target(name: "MarkdownEngine"),
.target(
name: "MarkdownEngineCodeBlocks",
dependencies: ["MarkdownEngine"],
resources: [
.copy("Resources/highlight.min.js"),
.copy("Resources/highlight.js-LICENSE.txt"),
]
),
.target(
name: "MarkdownEngineLatex",
dependencies: [
"MarkdownEngine",
.product(name: "SwiftMath", package: "SwiftMath"),
]
),
.testTarget(
name: "MarkdownEngineTests",
dependencies: ["MarkdownEngine"]
),
.testTarget(
name: "MarkdownEngineCodeBlocksTests",
dependencies: ["MarkdownEngine", "MarkdownEngineCodeBlocks"]
),
.testTarget(
name: "MarkdownEngineLatexTests",
dependencies: ["MarkdownEngine", "MarkdownEngineLatex"]
)
]
)