From 0b2b0a13584e13ea7e7f96f65da72d3664c09078 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 17 Jun 2022 15:19:00 +0200 Subject: [PATCH] feat: bundle css with backend --- .gitignore | 1 + Makefile | 8 ++++++-- frontend/data.go | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b361548..ee52162 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ frontend/dist/* dist-ssr !frontend/dist/.empty *.local +frontend/style.css # Editor directories and files .vscode/* diff --git a/Makefile b/Makefile index f753760..1247241 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: all -all: frontend backend +all: frontend css backend mv api pronouns .PHONY: migrate @@ -7,13 +7,17 @@ migrate: go run -v ./scripts/migrate .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 .PHONY: frontend frontend: yarn build +.PHONY: css +css: + yarn tailwindcss -m -o frontend/style.css + .PHONY: dev dev: yarn dev diff --git a/frontend/data.go b/frontend/data.go index 64d28ba..9ab9449 100644 --- a/frontend/data.go +++ b/frontend/data.go @@ -4,3 +4,6 @@ import "embed" //go:embed dist/* var Data embed.FS + +//go:embed style.css +var CSS []byte