Skip to content

Commit

Permalink
chore: remove scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Sep 29, 2024
1 parent c5f3b41 commit 957d540
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"time"

htmx "github.com/zeiss/fiber-htmx"
"github.com/zeiss/fiber-htmx/bundle"
"github.com/zeiss/fiber-htmx/components/alerts"
"github.com/zeiss/fiber-htmx/components/avatars"
"github.com/zeiss/fiber-htmx/components/buttons"
Expand Down Expand Up @@ -121,8 +120,9 @@ func (c *exampleController) Error(err error) error {
Title: "error",
Language: "en",
Head: []htmx.Node{
htmx.Link(
htmx.Attribute("href", "/static/out.js"),
htmx.Script(
htmx.Attribute("src", "https://unpkg.com/fiber-htmx@1.3.27"),
htmx.Defer(),
),
},
},
Expand Down Expand Up @@ -592,8 +592,6 @@ func (w *webSrv) Start(ctx context.Context, ready server.ReadyFunc, run server.R
return &exampleController{}
}))

app.Use("/static", bundle.New(bundle.Config{PathPrefix: "/static"}))

app.Get("/sse", sse.NewSSEHandler(w.manager))

app.Post("/error", htmx.NewHxControllerHandler(func() htmx.Controller {
Expand Down
6 changes: 2 additions & 4 deletions examples/toasts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"

htmx "github.com/zeiss/fiber-htmx"
"github.com/zeiss/fiber-htmx/bundle"
"github.com/zeiss/fiber-htmx/components/avatars"
"github.com/zeiss/fiber-htmx/components/buttons"
"github.com/zeiss/fiber-htmx/components/drawers"
Expand Down Expand Up @@ -86,7 +85,8 @@ func (c *exampleController) Get() error {
htmx.Attribute("src", "https://cdn.tailwindcss.com"),
),
htmx.Script(
htmx.Attribute("src", "/static/out.js"),
htmx.Attribute("src", "https://unpkg.com/fiber-htmx@1.3.27"),
htmx.Defer(),
),
},
},
Expand Down Expand Up @@ -331,8 +331,6 @@ func (w *webSrv) Start(ctx context.Context, ready server.ReadyFunc, run server.R
app.Use(logger.New())
app.Use(recover.New())

app.Use("/static", bundle.New(bundle.Config{PathPrefix: "/static"}))

app.Get("/", htmx.NewHxControllerHandler(func() htmx.Controller {
return &exampleController{}
}))
Expand Down

0 comments on commit 957d540

Please sign in to comment.