nichady / golte

Render Svelte components in your Go http handlers.
https://pkg.go.dev/github.com/nichady/golte
MIT License
185 stars 7 forks source link

live reload #7

Open derkan opened 6 months ago

derkan commented 6 months ago

Are you planning to add live reload on svelte or go file change?

nichady commented 6 months ago

Possibly yes eventually, but I haven't really thought much about it yet.

jaybeecave commented 4 months ago

unproven idea. but wouldn't https://github.com/cosmtrek/air do the trick if you were to configure it to watch the .svelte files. it just recompiles go after all :)

jaybeecave commented 4 months ago

air didnt work.

nodemon did :)

{
  "name": "svelte-test",
  "version": "1.0.0",
  "type": "module",
  "scripts": {
    "dev": "golte dev && go run .",
    "watch": "nodemon --watch ./ --signal SIGTERM --exec 'golte dev && go run .'"
  },
  "dependencies": {
    "golte": "0.0.4",
    "svelte": "^4.2.9"
  },
  "nodemonConfig": {
    "ext": ".go,.svelte",
    "ignore": [
      "build/**",
      "tmp/**"
    ]
  },
  "devDependencies": {
    "nodemon": "^3.1.2"
  }
}
image