feat: bundle css with backend
This commit is contained in:
parent
ad2c527e0e
commit
0b2b0a1358
3 changed files with 10 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,6 +14,7 @@ frontend/dist/*
|
||||||
dist-ssr
|
dist-ssr
|
||||||
!frontend/dist/.empty
|
!frontend/dist/.empty
|
||||||
*.local
|
*.local
|
||||||
|
frontend/style.css
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
.vscode/*
|
.vscode/*
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -1,5 +1,5 @@
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: frontend backend
|
all: frontend css backend
|
||||||
mv api pronouns
|
mv api pronouns
|
||||||
|
|
||||||
.PHONY: migrate
|
.PHONY: migrate
|
||||||
|
@ -7,13 +7,17 @@ migrate:
|
||||||
go run -v ./scripts/migrate
|
go run -v ./scripts/migrate
|
||||||
|
|
||||||
.PHONY: backend
|
.PHONY: backend
|
||||||
backend:
|
backend: css
|
||||||
CGO_ENABLED=0 go build -v -o api -ldflags="-buildid= -X codeberg.org/u1f320/pronouns.cc/backend/server.Revision=`git rev-parse --short HEAD`" ./backend
|
CGO_ENABLED=0 go build -v -o api -ldflags="-buildid= -X codeberg.org/u1f320/pronouns.cc/backend/server.Revision=`git rev-parse --short HEAD`" ./backend
|
||||||
|
|
||||||
.PHONY: frontend
|
.PHONY: frontend
|
||||||
frontend:
|
frontend:
|
||||||
yarn build
|
yarn build
|
||||||
|
|
||||||
|
.PHONY: css
|
||||||
|
css:
|
||||||
|
yarn tailwindcss -m -o frontend/style.css
|
||||||
|
|
||||||
.PHONY: dev
|
.PHONY: dev
|
||||||
dev:
|
dev:
|
||||||
yarn dev
|
yarn dev
|
||||||
|
|
|
@ -4,3 +4,6 @@ import "embed"
|
||||||
|
|
||||||
//go:embed dist/*
|
//go:embed dist/*
|
||||||
var Data embed.FS
|
var Data embed.FS
|
||||||
|
|
||||||
|
//go:embed style.css
|
||||||
|
var CSS []byte
|
||||||
|
|
Loading…
Reference in a new issue