docs(cli): Better descriptions for live-reload parameters#8373
docs(cli): Better descriptions for live-reload parameters#8373OS-pedrogustavobilro merged 2 commits intomainfrom
Conversation
jcesarmobile
left a comment
There was a problem hiding this comment.
rather than "live-reload server", I would say "live-reload url", since this doesn't really have any effect in the server, the server needs to be started before running the cap run command to know the hostname/port and the server is not provided by Capacitor.
Also, instead of "Change default" I think it should say "Configure", as at least for --port there is no default value if using --https, and as I commented on the PR that added that configuration, we should not really have a default port value since it's not really helpful as most apps not use 3000 this days, or maybe set it to 5173 since it's the vite default port and most tooling/apps are moving to vite, but still I would prefer no default.
Following PR comments
Yeah that's better, I was unsure if you meant it for
Yeah that's also better, updated it.
I was thinking of opening a PR to |
jcesarmobile
left a comment
There was a problem hiding this comment.
Looks good
note that once it's published, it should also be updated in https://capacitorjs.com/docs/cli/commands/run
Existing values there as slightly different from what the CLI was showing before this change, but I think the new texts are better.
Alternative PR to #8370
I had not realised that the
--live-reloadoption overrides theserver.urlCapacitorConfig on purpose - In fact, the purpose of this property is really to allow to point to a certain live-reload server in the CLI, without having to set it in Capacitor Config (e.g. to avoid accidentally deploying that URL to production).The description of the CLI option however was not the best, as it indicated "Enable Live Reload", when it fact it doesn't really do that. You can set
server.urlin Capacitor Config, and runcap runwithout--live-reload, and live reload should still work.Therefore, in this PR I update the descriptions of the live reload CLI options to better reflect what they actually do.
FYI @aolsenjazz