some fixes
This commit is contained in:
parent
8b816e9566
commit
ecb42207f1
5 changed files with 11 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ RUN go mod download
|
|||
COPY . .
|
||||
|
||||
# Build the Go binary for Linux
|
||||
RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@9a5b929877017f0b6705d819e85001e6e2627dbf build
|
||||
RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@8b816e956692683337d9fff6416ccc31f5047b59 build
|
||||
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o ./dist -a -ldflags '-linkmode external -extldflags "-static"' .
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ require (
|
|||
github.com/coder/websocket v1.8.12
|
||||
github.com/go-chi/chi/v5 v5.1.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/maddalax/htmgo/framework v0.0.0-20241001184532-9a5b92987701
|
||||
github.com/maddalax/htmgo/framework v0.0.0-20241002032603-8b816e956692
|
||||
github.com/mattn/go-sqlite3 v1.14.23
|
||||
github.com/puzpuzpuz/xsync/v3 v3.4.0
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
|||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/maddalax/htmgo/framework v0.0.0-20241001184532-9a5b92987701 h1:0Zk282axc1kPiuspLNzK5BJV7cQ5h2kPZHe54dznhYY=
|
||||
github.com/maddalax/htmgo/framework v0.0.0-20241001184532-9a5b92987701/go.mod h1:HYKI49Pb6oyY2opSJdTt145B1vWgfWIDohvlolynv80=
|
||||
github.com/maddalax/htmgo/framework v0.0.0-20241002032603-8b816e956692 h1:NtLJ7GcD9hWvPYmombxC1SzVNgvnhLXWhZEQJZOstik=
|
||||
github.com/maddalax/htmgo/framework v0.0.0-20241002032603-8b816e956692/go.mod h1:HYKI49Pb6oyY2opSJdTt145B1vWgfWIDohvlolynv80=
|
||||
github.com/mattn/go-sqlite3 v1.14.23 h1:gbShiuAP1W5j9UOksQ06aiiqPMxYecovVGwmTxWtuw0=
|
||||
github.com/mattn/go-sqlite3 v1.14.23/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
|
|
|
|||
4
framework/assets/dist/htmgo.js
vendored
4
framework/assets/dist/htmgo.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,5 @@
|
|||
import htmx from 'htmx.org'
|
||||
import {removeAssociatedScripts} from "./htmgo";
|
||||
|
||||
let api : any = null;
|
||||
let processed = new Set<string>()
|
||||
|
|
@ -14,6 +15,10 @@ htmx.defineExtension("sse", {
|
|||
return
|
||||
}
|
||||
|
||||
if(name === 'htmx:beforeCleanupElement') {
|
||||
removeAssociatedScripts(target);
|
||||
}
|
||||
|
||||
if(name === 'htmx:beforeProcessNode') {
|
||||
const elements = document.querySelectorAll('[sse-connect]');
|
||||
for (let element of Array.from(elements)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue