Skip to content

Commit

Permalink
Merge pull request #13 from robb/swim
Browse files Browse the repository at this point in the history
Rename to Swim, move HTML into its own target.
  • Loading branch information
robb authored Oct 17, 2020
2 parents 4b25b2e + 582f63e commit 46d115e
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Generator/Sources/Generator/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ struct Generator: ParsableCommand {
.joined(separator: "\n\n\n")

print("// This output is machine generated and should not be edited manually.")
print("\n")
print("@_exported import Swim")
print("\n")
print(output)
}
}
Expand Down
11 changes: 10 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@ let package = Package(
.library(
name: "HTML",
targets: ["HTML"]),
.library(
name: "Swim",
targets: ["Swim"]),
],
targets: [
.target(
name: "HTML",
dependencies: []),
dependencies: ["Swim"]),
.testTarget(
name: "HTMLTests",
dependencies: ["HTML"]),
.target(
name: "Swim",
dependencies: []),
.testTarget(
name: "SwimTests",
dependencies: ["HTML"]),
]
)
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# HTML DSL
# Swim – Swift Marktup

A DSL for building HTML documents with Swift [function builders].

Currently in use on [my personal website].

```swift
import Swim
import HTML

let myDocument = html(lang: "en-US") {
head {
meta(charset: "utf-8", content: "text/html", httpEquiv: "Content-Type")
Expand Down
5 changes: 5 additions & 0 deletions Sources/HTML/Tags.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// This output is machine generated and should not be edited manually.


@_exported import Swim


/// a
///
/// Hyperlink.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions Tests/HTMLTests/HTMLTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import XCTest
import Swim

@testable import HTML

final class HTMLTests: XCTestCase {
Expand Down
7 changes: 7 additions & 0 deletions Tests/SwimTests/SwimTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest

@testable import Swim

final class SwimTests: XCTestCase {

}

0 comments on commit 46d115e

Please sign in to comment.