Open stevenengland opened 7 months ago
I think the best way would be to parse the io.package and get the infos about "used types" from there and then do the needed things based on this and not on existing files. The io-package is already read in some places if needed. Do you want to give it a try to adjust it yourself?
Hi @Apollon77 , I can't promise that I will try it because of spare free time (what else ;)?), but I also do not reject this offer yet :) One thing that frightens me is that there seems to be no obvious test tooling for the dev-server. I guess if there would be automated tests I would be more confident and might give it a try more quickly. Is there anything that I miss in regards of testing? Because it is a hughe codebase and I can't imagine that everything is tested manually... (?)
I would not know any automated tests for this - also because it is very hard to mock all the relevant things to have meaningful automated tests there. So tests are mainly done by really executing it on an own system.
The good in this case is that the changes are relatively limited in scope, so the risk to affect other functionality is not too high
I've searched over an hour now why my watch:react
isn't executed by the dev-server ðŸ˜
react
for tabs.create-adapter.json
:
"adminUi": "json",
"tabReact": "yes",
Workaround: Renamed the jsonConfig.json
to something else when using the dev-server.
What do you think ... how to best solve that ... simply always do both depending pon file existence?
Hi there,
currently the dev-server does not fully support to have a jsonConfig.json[5] and a React tab in parallel. At least the hot reload feature is a either/or decision. You can see that here: https://github.com/ioBroker/dev-server/blob/259a1ccfb9b75f4403a58e6feb47f1353845f195/src/index.ts#L638
Might be connected to https://github.com/ioBroker/dev-server/issues/464
Maybe there are more parts like this. But before I dive into that any more: Is this intendend behaviour? Like is there a fixed guideline for adapter development out there that says: Either use HTML/React for config, tab and custom or use jsonConfig for config (no tab/custom) and do not combine approaches?
I personally really like to use a React tab and jsonConfig for the simpler config part. But if this is not the way to go then I might switch because the missing hot reload feature is a killer for itself. Other downsides I haven't recognized so far but they may exist.
Thanks for feedback in advance!