Closed RblSb closed 2 years ago
Run khamake with the --watch
argument?
Thanks, there is v2 setup, tasks.json
:
{
"type": "shell",
"command": "node ${command:kha.findKha}/make html5 --watch",
"isBackground": false,
"problemMatcher": {
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "Haxe compilation...",
"endsPattern": "Haxe compile end."
}
},
"group": {
"kind": "build",
"isDefault": true
},
"label": "HTML5-watch"
},
Lets keep this open and add some watched setups to vscode in future, i think.
{
"name": "HTML5-watch",
"request": "launch",
"type": "pwa-node",
"program": "${command:kha.findKha}/make",
"args": [
"html5",
"--watch",
"--server",
"--port",
"4200",
"--livereload"
],
"killBehavior": "polite"
},
I think we can read
vshaxe.displayPort
in Kha vscode extension and pass it tokhamake
binary as some argument. Then, ifbuild/project-target.hxml
is not changed and completion target equals compilation target, use incremental compilation instead of basic compilation. As example, using generatedhxml
task instead ofkhamake
compiles basic Kha project in0.01s
instead of1.7s
for me in html5.Also some hack to reproduce this if someone interested:
.vscode/settings.json
.vscode/tasks.json