feat: initialized tailwind
basic conig targetting templ templ html page with import Makefile job that generates for the run
This commit is contained in:
12
Makefile
12
Makefile
@@ -8,8 +8,16 @@ GENERATED_FILES := $(TEMPL_FILES:.templ=_templ.go)
|
||||
$(GENERATED_FILES): $(TEMPL_FILES)
|
||||
templ generate
|
||||
|
||||
# Run task depends on the generated files
|
||||
run: $(GENERATED_FILES)
|
||||
TAILWIND_CONFIG := tailwind.config.js
|
||||
INPUT_CSS := input.css
|
||||
OUTPUT_CSS := static/output.css
|
||||
|
||||
# generate tailwindcss output
|
||||
$(OUTPUT_CSS): $(TEMPL_FILES) $(TAILWIND_CONFIG) $(INPUT_CSS)
|
||||
tailwindcss -i $(INPUT_CSS) -o $(OUTPUT_CSS)
|
||||
|
||||
# Run the server, with dependencies on templ and tailwind generation
|
||||
run: $(GENERATED_FILES) $(OUTPUT_CSS)
|
||||
go run .
|
||||
|
||||
# this uses wgo to re-execute 'make run'
|
||||
|
||||
Reference in New Issue
Block a user