aboutsummaryrefslogtreecommitdiff
path: root/Package.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Package.swift')
-rw-r--r--Package.swift11
1 files changed, 10 insertions, 1 deletions
diff --git a/Package.swift b/Package.swift
index dc42e93..f316060 100644
--- a/Package.swift
+++ b/Package.swift
@@ -18,9 +18,15 @@ let package = Package(
targets: ["NorgUI"]
),
],
+ traits: [
+ .trait(
+ name: "SwiftMathSupport",
+ description: "Render inline and block math using SwiftMath."
+ ),
+ ],
dependencies: [
- // NorgKit provides the parser and model value types.
.package(url: "https://git.sr.ht/~rbdr/norgkit", from: "1.0.0"),
+ .package(url: "https://github.com/mgriebling/SwiftMath", from: "1.7.0"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
@@ -29,6 +35,9 @@ let package = Package(
name: "NorgUI",
dependencies: [
.product(name: "NorgKit", package: "norgkit"),
+ .product(
+ name: "SwiftMath", package: "SwiftMath",
+ condition: .when(traits: ["SwiftMathSupport"])),
],
resources: [
.process("Resources"),