nichady / golte

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

live reload #7

Open derkan opened 8 months ago

derkan commented 8 months ago

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

nichady commented 8 months ago

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

jaybeecave commented 6 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 5 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
TimLai666 commented 3 weeks ago

Here is what you want. https://github.com/TimLai666/golte-cli