Update for htmx 1.7.0 #4

Merged
danieljsummers merged 2 commits from one-point-seven into main 2022-02-24 02:54:51 +00:00
4 changed files with 22 additions and 7 deletions
Showing only changes of commit a7cfb360e8 - Show all commits

View File

@ -2,7 +2,7 @@
This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`. This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`.
**htmx version: 1.6.1** **htmx version: 1.7.0**
### Setup ### Setup

View File

@ -450,3 +450,18 @@ module Attributes =
let ``_hxWs succeeds`` () = let ``_hxWs succeeds`` () =
ul [ _hxWs "connect:/web-socket" ] [] |> shouldRender """<ul hx-ws="connect:/web-socket"></ul>""" ul [ _hxWs "connect:/web-socket" ] [] |> shouldRender """<ul hx-ws="connect:/web-socket"></ul>"""
/// Tests for the Script module
module Script =
[<Fact>]
let ``Script.minified succeeds`` () =
let html = RenderView.AsString.htmlNode Script.minified
Assert.Equal ("""<script src="https://unpkg.com/htmx.org@1.7.0" integrity="sha384-EzBXYPt0/T6gxNp0nuPtLkmRpmDBbjg6WmCUZRLXBBwYYmwAUxzlSGej0ARHX0Bo" crossorigin="anonymous"></script>""",
html)
[<Fact>]
let ``Script.unminified succeeds`` () =
let html = RenderView.AsString.htmlNode Script.unminified
Assert.Equal ("""<script src="https://unpkg.com/htmx.org@1.7.0/dist/htmx.js" integrity="sha384-ESk4PjE7dwjGkEciohREmmf8rLMX0E95MKwxM3bvC90sZ3XbF2TELnVk2w7bX0d9" crossorigin="anonymous"></script>""",
html)

View File

@ -224,15 +224,15 @@ module Script =
/// Script tag to load the minified version from unpkg.com /// Script tag to load the minified version from unpkg.com
let minified = let minified =
script [ script [
_src "https://unpkg.com/htmx.org@1.6.1" _src "https://unpkg.com/htmx.org@1.7.0"
_integrity "sha384-tvG/2mnCFmGQzYC1Oh3qxQ7CkQ9kMzYjWZSNtrRZygHPDDqottzEJsqS4oUVodhW" _integrity "sha384-EzBXYPt0/T6gxNp0nuPtLkmRpmDBbjg6WmCUZRLXBBwYYmwAUxzlSGej0ARHX0Bo"
_crossorigin "anonymous" _crossorigin "anonymous"
] [] ] []
/// Script tag to load the unminified version from unpkg.com /// Script tag to load the unminified version from unpkg.com
let unminified = let unminified =
script [ script [
_src "https://unpkg.com/htmx.org@1.6.1/dist/htmx.js" _src "https://unpkg.com/htmx.org@1.7.0/dist/htmx.js"
_integrity "sha384-7G9OE6gS4pBnBGH74HojjPQ8xOEGrdBeQc7JJOc58k6LG/YVfKXARd91w9715AYG" _integrity "sha384-ESk4PjE7dwjGkEciohREmmf8rLMX0E95MKwxM3bvC90sZ3XbF2TELnVk2w7bX0d9"
_crossorigin "anonymous" _crossorigin "anonymous"
] [] ] []

View File

@ -2,7 +2,7 @@
This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine. This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine.
**htmx version: 1.6.1** **htmx version: 1.7.0**
### Setup ### Setup