Current section
7 Versions
Jump to
Current section
7 Versions
Compare versions
4
files changed
+21
additions
-8
deletions
| @@ -8,3 +8,16 @@ Wisp adaptor for <https://hexdocs.pm/datastar> | |
| 8 8 | ```sh |
| 9 9 | gleam add datastar_wisp@1 |
| 10 10 | ``` |
| 11 | + |
| 12 | + ```gleam |
| 13 | + let events = [ |
| 14 | + datastar.merge_fragments("<span>Hello</span>") |
| 15 | + |> datastar.merge_fragments_selector("#notice") |
| 16 | + |> datastar.merge_fragments_end, |
| 17 | + ] |
| 18 | + |
| 19 | + wisp.ok() |
| 20 | + |> datastar_wisp.send(events) |
| 21 | + ``` |
| 22 | + |
| 23 | + This will add the events data to the Wisp response. And will also add the expected headers by Datastar. |
| @@ -1,5 +1,5 @@ | |
| 1 1 | name = "datastar_wisp" |
| 2 | - version = "1.0.0" |
| 2 | + version = "1.0.1" |
| 3 3 | |
| 4 4 | description = "Wisp adaptor for Datastar" |
| 5 5 | licences = ["MIT"] |
| @@ -1,6 +1,6 @@ | |
| 1 1 | {<<"name">>, <<"datastar_wisp">>}. |
| 2 2 | {<<"app">>, <<"datastar_wisp">>}. |
| 3 | - {<<"version">>, <<"1.0.0">>}. |
| 3 | + {<<"version">>, <<"1.0.1">>}. |
| 4 4 | {<<"description">>, <<"Wisp adaptor for Datastar"/utf8>>}. |
| 5 5 | {<<"licenses">>, [<<"MIT">>]}. |
| 6 6 | {<<"build_tools">>, [<<"gleam">>]}. |
| @@ -8,16 +8,16 @@ | |
| 8 8 | {<<"Repository">>, <<"https://github.com/sporto/gleam-datastar">>} |
| 9 9 | ]}. |
| 10 10 | {<<"requirements">>, [ |
| 11 | - {<<"wisp">>, [ |
| 12 | - {<<"app">>, <<"wisp">>}, |
| 13 | - {<<"optional">>, false}, |
| 14 | - {<<"requirement">>, <<">= 1.0.0 and < 2.0.0">>} |
| 15 | - ]}, |
| 16 11 | {<<"gleam_stdlib">>, [ |
| 17 12 | {<<"app">>, <<"gleam_stdlib">>}, |
| 18 13 | {<<"optional">>, false}, |
| 19 14 | {<<"requirement">>, <<">= 0.34.0 and < 2.0.0">>} |
| 20 15 | ]}, |
| 16 | + {<<"wisp">>, [ |
| 17 | + {<<"app">>, <<"wisp">>}, |
| 18 | + {<<"optional">>, false}, |
| 19 | + {<<"requirement">>, <<">= 1.0.0 and < 2.0.0">>} |
| 20 | + ]}, |
| 21 21 | {<<"datastar">>, [ |
| 22 22 | {<<"app">>, <<"datastar">>}, |
| 23 23 | {<<"optional">>, false}, |
| @@ -1,5 +1,5 @@ | |
| 1 1 | {application, datastar_wisp, [ |
| 2 | - {vsn, "1.0.0"}, |
| 2 | + {vsn, "1.0.1"}, |
| 3 3 | {applications, [datastar, |
| 4 4 | gleam_stdlib, |
| 5 5 | wisp]}, |