diff --git a/v3/go.mod b/v3/go.mod index d0a1dc3d3..43b1a4341 100644 --- a/v3/go.mod +++ b/v3/go.mod @@ -3,7 +3,7 @@ module github.com/wailsapp/wails/v3 go 1.21 require ( - github.com/atterpac/refresh v0.7.4 + github.com/atterpac/refresh v0.8.0 github.com/bep/debounce v1.2.1 github.com/ebitengine/purego v0.4.0-alpha.4 github.com/go-git/go-git/v5 v5.11.0 diff --git a/v3/go.sum b/v3/go.sum index edc14900e..e2b1eb14c 100644 --- a/v3/go.sum +++ b/v3/go.sum @@ -31,8 +31,8 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuW github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atomicgo/cursor v0.0.1/go.mod h1:cBON2QmmrysudxNBFthvMtN32r3jxVRIvzkUiF/RuIk= -github.com/atterpac/refresh v0.7.4 h1:EFknxg00weECF6jlQGKnhFaAMxhArwYwriqgS/ko9io= -github.com/atterpac/refresh v0.7.4/go.mod h1:fJpWySLdpbANS8Ej5OvfZVZIVvi/9bmnhTjKS5EjQes= +github.com/atterpac/refresh v0.8.0 h1:KGMu60O/D1CxjvNwxcDJriCJo0CX9DLqY0lwLLaW4nE= +github.com/atterpac/refresh v0.8.0/go.mod h1:fJpWySLdpbANS8Ej5OvfZVZIVvi/9bmnhTjKS5EjQes= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= diff --git a/v3/internal/commands/build_assets/devmode.config.tmpl.toml b/v3/internal/commands/build_assets/devmode.config.tmpl.toml deleted file mode 100644 index 684a818a9..000000000 --- a/v3/internal/commands/build_assets/devmode.config.tmpl.toml +++ /dev/null @@ -1,35 +0,0 @@ -[config] -root_path = "." -# debug | info | warn | error | mute -# Defaults to Info if not provided -log_level = "warn" -# Debounce setting for ignoring reptitive file system notifications -debounce = 1000 # Milliseconds -# Sets what files the watcher should ignore -[config.ignore] -# Directories to ignore -dir = [".git", "node_modules", "frontend", "bin"] -# Files to ignore -file = [".DS_Store", ".gitignore", ".gitkeep"] -# File extensions to watch -watched_extension = ["*.go"] -# Add .gitignore paths to ignore -git_ignore = true - -[config.background] -cmd = "wails3 task dev:frontend" - -[[config.executes]] -cmd = "go mod tidy" -blocking = true - -[[config.executes]] -cmd = "wails3 task build" -blocking = true - -[[config.executes]] -cmd = "KILL_STALE" - -[[config.executes]] -cmd = "wails3 task run" -primary = true diff --git a/v3/internal/commands/build_assets/devmode.config.tmpl.yaml b/v3/internal/commands/build_assets/devmode.config.tmpl.yaml new file mode 100644 index 000000000..1a441f248 --- /dev/null +++ b/v3/internal/commands/build_assets/devmode.config.tmpl.yaml @@ -0,0 +1,28 @@ +config: + root_path: . + log_level: warn + debounce: 1000 + ignore: + dir: + - .git + - node_modules + - frontend + - bin + file: + - .DS_Store + - .gitignore + - .gitkeep + watched_extension: + - "*.go" + git_ignore: true + executes: + - cmd: wails3 task install:frontend:deps + type: once + - cmd: wails3 task dev:frontend + type: background + - cmd: go mod tidy + type: blocking + - cmd: wails3 task build + type: blocking + - cmd: wails3 task run + type: primary diff --git a/v3/internal/commands/dev.go b/v3/internal/commands/dev.go index a6920b2f1..20e36e049 100644 --- a/v3/internal/commands/dev.go +++ b/v3/internal/commands/dev.go @@ -15,7 +15,7 @@ const wailsVitePort = "WAILS_VITE_PORT" type DevOptions struct { flags.Common - Config string `description:"The config file including path" default:"./build/devmode.config.toml"` + Config string `description:"The config file including path" default:"./build/devmode.config.yaml"` VitePort int `name:"port" description:"Specify the vite dev server port"` } diff --git a/v3/internal/commands/watcher.go b/v3/internal/commands/watcher.go index cf9ee434e..25a67a6e2 100644 --- a/v3/internal/commands/watcher.go +++ b/v3/internal/commands/watcher.go @@ -12,7 +12,7 @@ type WatcherOptions struct { func Watcher(options *WatcherOptions) error { stopChan := make(chan struct{}) - watcherEngine, err := engine.NewEngineFromTOML(options.Config) + watcherEngine, err := engine.NewEngineFromYAML(options.Config) if err != nil { return err } diff --git a/v3/internal/templates/_common/Taskfile.tmpl.yml b/v3/internal/templates/_common/Taskfile.tmpl.yml index 8d476fe3d..7be6fd47a 100644 --- a/v3/internal/templates/_common/Taskfile.tmpl.yml +++ b/v3/internal/templates/_common/Taskfile.tmpl.yml @@ -437,9 +437,9 @@ tasks: dev: summary: Runs the application in development mode cmds: - - wails3 dev -config ./build/devmode.config.toml -port {{ "{{.VITE_PORT}}" }} + - wails3 dev -config ./build/devmode.config.yaml -port {{ "{{.VITE_PORT}}" }} dev:reload: summary: Reloads the application cmds: - - task: run \ No newline at end of file + - task: run