diff --git a/.air.toml b/.air.toml index 78353d6..987e76e 100644 --- a/.air.toml +++ b/.air.toml @@ -41,4 +41,4 @@ tmp_dir = "tmp" [screen] clear_on_rebuild = false - keep_scroll = true \ No newline at end of file + keep_scroll = true diff --git a/.gitignore b/.gitignore index 66bd57e..e7ca334 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ assets/ # OS files .DS_Store Thumbs.db + +# For air temp files +tmp/ diff --git a/Makefile b/Makefile index a29ec8c..fa833bd 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -.PHONY: generate build run dev clean +.PHONY: generate build run dev clean install-air + +KO_DOCKER_REPO?=ttl.sh/jason # Generate frontend assets generate: @@ -12,10 +14,13 @@ build: generate run: generate go run . -port=8080 -# Development mode - watch for changes -dev: generate - go run . -port=8080 +# Development mode - watch for changes and auto-reload +dev: + go tool air + +image: + KO_DOCKER_REPO=$(KO_DOCKER_REPO) ko build # Clean generated files clean: - rm -rf assets/ frontend/node_modules/ frontend/package-lock.json gojs \ No newline at end of file + rm -rf assets/ frontend/node_modules/ frontend/package-lock.json gojs diff --git a/frontend/src/index.html b/frontend/src/index.html index af4ec59..4806ac6 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -43,4 +43,4 @@
- \ No newline at end of file + diff --git a/go.mod b/go.mod index e36d7e0..a2f8ad6 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,27 @@ module github.com/imjasonh/gojs go 1.25.0 + +tool github.com/air-verse/air + +require ( + dario.cat/mergo v1.0.2 // indirect + github.com/air-verse/air v1.62.0 // indirect + github.com/bep/godartsass/v2 v2.5.0 // indirect + github.com/bep/golibsass v1.2.0 // indirect + github.com/creack/pty v1.1.24 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gohugoio/hugo v0.147.6 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/spf13/afero v1.14.0 // indirect + github.com/spf13/cast v1.8.0 // indirect + github.com/tdewolff/parse/v2 v2.8.1 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/text v0.25.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect +) diff --git a/main.go b/main.go index a5de14b..fd4b810 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,4 @@ +package main import ( "embed"