-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
76 lines (75 loc) · 2.64 KB
/
Copy pathPackage.swift
File metadata and controls
76 lines (75 loc) · 2.64 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// swift-tools-version: 6.2
//
// NotesEditor — HelloNotes' own Markdown editing engine.
//
// MarkdownCore platform-free kernel: incremental block/inline parsing
// and the pure style specification. Foundation-only,
// Sendable, fully unit-tested.
// MarkdownEditor the TextKit 2 editor UI (AppKit + UIKit + SwiftUI).
// GFMRender GitHub-identical Markdown → HTML via cmark-gfm (the same
// engine GitHub uses), verified against the GFM spec corpus.
//
// Design rationale: docs/implemented.md at the repository root.
//
import PackageDescription
let package = Package(
name: "NotesEditor",
platforms: [.macOS(.v15), .iOS(.v18)],
products: [
.library(name: "MarkdownCore", targets: ["MarkdownCore"]),
.library(name: "MarkdownEditor", targets: ["MarkdownEditor"]),
.library(name: "GFMRender", targets: ["GFMRender"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-cmark.git", branch: "gfm"),
],
targets: [
.target(
name: "MarkdownCore",
swiftSettings: [.swiftLanguageMode(.v6)]
),
.target(
name: "MarkdownEditor",
dependencies: ["MarkdownCore", "GFMRender"],
swiftSettings: [
.swiftLanguageMode(.v6),
.defaultIsolation(MainActor.self),
]
),
.target(
name: "GFMRender",
dependencies: [
.product(name: "cmark-gfm", package: "swift-cmark"),
.product(name: "cmark-gfm-extensions", package: "swift-cmark"),
],
resources: [
.copy("github-markdown.css"),
.copy("highlight.min.js"),
.copy("hljs-github.css"),
.copy("hljs-github-dark.css"),
],
swiftSettings: [.swiftLanguageMode(.v6)]
),
.testTarget(
name: "MarkdownCoreTests",
dependencies: ["MarkdownCore"],
swiftSettings: [.swiftLanguageMode(.v6)]
),
.testTarget(
name: "MarkdownEditorTests",
dependencies: ["MarkdownEditor", "GFMRender"],
resources: [.copy("spec.txt")],
swiftSettings: [.swiftLanguageMode(.v6)]
),
.testTarget(
name: "GFMRenderTests",
dependencies: ["GFMRender"],
resources: [
.copy("spec.txt"),
.copy("github-parity-input.md"),
.copy("github-parity-expected.html"),
],
swiftSettings: [.swiftLanguageMode(.v6)]
),
]
)