1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: improve the hot reload section, add run command example (#13418)

This commit is contained in:
Artem 2022-02-09 18:26:09 +01:00 committed by GitHub
parent f2eb50008d
commit 43d6b97c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5590,6 +5590,12 @@ fn main() {
```
Build this example with `v -live message.v`.
You can also run this example with `v -live run message.v`.
Make sure that in command you use a path to a V's file,
**not** a path to a folder (like `v -live run .`) -
in that case you need to modify content of a folder (add new file, for example),
because changes in *message.v* will have no effect.
Functions that you want to be reloaded must have `[live]` attribute
before their definition.