diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c5316c9 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +hmr: + templ generate --watch --proxy="http://localhost:1323" --cmd="go run ." + +start: + go run . diff --git a/README.md b/README.md index 8fce933..8faac1b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,21 @@ # chronologger -To run, do `go run .` +Chronologger is a personal review app, built with Golang. + +# Development + +Start the application with hot module reloading using `make hmr`. + +Alternatively, if you don't need hot module reloading, you can just run `go run .` or `make start` + +## Known issues + +``` +(!) templ version check failed: failed to parse go.mod file: ~/chronologger/go.mod:3: invalid go version '1.21.0': must match format 1.23 +``` +To fix this, make sure you have at least the following version installed: +``` +go install github.com/a-h/templ/cmd/templ@v0.2.543 +``` +You can test this by running `templ version`. -Please submit a PR first TEST diff --git a/base.templ b/base.templ index f4a7c2b..e437148 100644 --- a/base.templ +++ b/base.templ @@ -17,5 +17,4 @@ templ hello(name string) { opacity: 0.5; } - } diff --git a/base_templ.go b/base_templ.go index 0c5d42c..3bc7136 100644 --- a/base_templ.go +++ b/base_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.543 +// templ: version: v0.2.562 package main //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -23,7 +23,7 @@ func hello(name string) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Hello, ") + templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 1) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -36,7 +36,7 @@ func hello(name string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Click me") + templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 2) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }