Kode / Kha

Ultra-portable, high performance, open source multimedia framework.
http://kha.tech
zlib License
1.48k stars 174 forks source link

Live reload html5/electron #1409

Closed RblSb closed 2 years ago

RblSb commented 2 years ago

Perfect vscode html5 launch task:

{
    "name": "HTML5-watch",
    "request": "launch",
    "type": "pwa-node",
    "program": "${command:kha.findKha}/make",
    "args": [
        "html5",
        "--watch",
        "--server",
        "--port",
        "4200",
        "--livereload"
    ],
    "killBehavior": "polite"
}

(run and open localhost:4200, use ctrl-s to rebuild and reload page). For debug-html5 it is little more complicated, because you need to open Electron after watch-compilation, so this is just example: live_electron.zip (works better with electron window on separate screen, because page reload resets window cords)