Skip to content

Commit

Permalink
refactor: rename web -> static
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsNotGoodName committed Jul 20, 2022
1 parent cb5cc2e commit 300bb30
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: npm install --prefix left/web
- run: npm run css-build --prefix left/web
- run: npm install --prefix left/static
- run: npm run css-build --prefix left/static
- name: Set up Go
uses: actions/setup-go@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NPM_PREFIX := podman run --rm -it -v "$(shell pwd)/left/web:/work" -w /work docker.io/library/node:16
NPM_PREFIX := podman run --rm -it -v "$(shell pwd)/left/static:/work" -w /work docker.io/library/node:16

all: npm snapshot

Expand Down
4 changes: 2 additions & 2 deletions left/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/ItsNotGoodName/smtpbridge/left/controller"
"github.com/ItsNotGoodName/smtpbridge/left/web"
"github.com/ItsNotGoodName/smtpbridge/left/static"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
)
Expand All @@ -36,7 +36,7 @@ func New(addr string, c *controller.Controller, dataFS fs.FS) *Router {
// processing should be stopped.
r.Use(middleware.Timeout(60 * time.Second))

r.Get("/css/*", handlePrefixFS("/css/", web.CSSFS()))
r.Get("/css/*", handlePrefixFS("/css/", static.CSSFS()))

r.Get("/", c.IndexGet)
r.Route("/envelope/{id}", func(r chi.Router) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion left/web/web.go → left/static/static.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package web
package static

import (
"embed"
Expand Down

0 comments on commit 300bb30

Please sign in to comment.