Skip to content

Commit f748991

Browse files
committed
renamed to hyperscript
1 parent e5fdf14 commit f748991

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

Package.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ let package = Package(
5353
name: "ElementaryHyperscript",
5454
dependencies: [
5555
.product(name: "Elementary", package: "elementary"),
56-
.target(name: "ElementaryHTMX"),
5756
],
5857
swiftSettings: featureFlags
5958
),

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import Elementary
5252
import ElementaryHyperscript
5353

5454
// Hyperscript extension
55-
button(.hs("on click send hello to <form />")) {
55+
button(.hyperscript("on click send hello to <form />")) {
5656
"Send"
5757
}
5858
```
@@ -69,7 +69,7 @@ The package brings the `.hx` syntaxt to all `HTMLElements` - providing a rich AP
6969

7070
There is also an `ElementaryHTMXSSE` module that adds the `.sse` syntax for the [Server Sent Events extensions](https://github.com/bigskysoftware/htmx-extensions/blob/main/src/sse/README.md), as well as `ElementaryHTMXWS` to add the `.ws` syntax for the [WebSockets extensions.](https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ws/README.md)
7171

72-
The package also supports the [Hyperscript](https://hyperscript.org) `_` attribute as `.hs`.
72+
The package also supports the [Hyperscript](https://hyperscript.org) `_` attribute as `.hyperscript`.
7373

7474
## Future directions
7575

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Elementary
22

33
public extension HTMLAttribute where Tag: HTMLTrait.Attributes.Global {
4-
static func hs(_ script: String) -> HTMLAttribute {
4+
static func hyperscript(_ script: String) -> Self {
55
.init(name: "_", value: script)
66
}
77
}

Tests/ElementaryHyperscriptTest/ElementaryHyperscriptTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import XCTest
55

66
final class elementary_hyperscriptTests: XCTestCase {
77
func testScript() {
8-
HTMLAttributeAssertEqual(.hs("on click send hello to <form />"), "_", "on click send hello to <form />")
8+
HTMLAttributeAssertEqual(.hyperscript("on click send hello to <form />"), "_", "on click send hello to <form />")
99
}
1010
}

0 commit comments

Comments
 (0)