refactor: add esbuild and modulerize css into seperate files
This commit is contained in:
10
Makefile
10
Makefile
@ -1,8 +1,12 @@
|
||||
VERSION=`git rev-parse --short HEAD`
|
||||
|
||||
gentempl:
|
||||
@command -v templ &> /dev/null || go install github.com/a-h/templ/cmd/templ@latest
|
||||
build:gentempl
|
||||
templ generate && go build -ldflags="-X 'github.com/rramiachraf/dumb/data.Version=$(VERSION)' -s -w"
|
||||
command -v templ &> /dev/null || go install github.com/a-h/templ/cmd/templ@latest
|
||||
esbuild:
|
||||
[ ! -f ./esbuild ] && curl -fsSL https://esbuild.github.io/dl/latest | sh
|
||||
build:gentempl esbuild
|
||||
templ generate
|
||||
cat ./style/*.css | ./esbuild --loader=css --minify > ./static/style.css
|
||||
go build -ldflags="-X 'github.com/rramiachraf/dumb/data.Version=$(VERSION)' -s -w"
|
||||
fmt:
|
||||
templ fmt .
|
||||
|
Reference in New Issue
Block a user