|
97 | 97 | ignore_exts []string // extensions of files that will be ignored, even if they change (useful for sqlite.db files for example) |
98 | 98 | cmd_before_run string // a command to run before each re-run |
99 | 99 | cmd_after_run string // a command to run after each re-run |
100 | | - only_watch []string // If not empty, *all* files that trigger updates, should match *at least one* of these s.match_glob() patterns. This is also triggered for vweb apps, to monitor for just *.v,*.js,*.css,*.html in vweb projects. |
| 100 | + only_watch []string // If not empty, *all* files that trigger updates, should match *at least one* of these s.match_glob() patterns. This is also triggered for veb apps, to monitor for just *.v,*.js,*.css,*.html in veb projects. |
101 | 101 | } |
102 | 102 |
|
103 | 103 | struct ParsedWatchOptions { |
@@ -176,23 +176,23 @@ fn (mut context Context) get_stats_for_affected_vfiles() []VFileStat { |
176 | 176 | } |
177 | 177 | paths << reported_used_files |
178 | 178 | } |
179 | | - mut is_vweb_found := false |
| 179 | + mut is_veb_found := false |
180 | 180 | for vf in paths { |
181 | 181 | apaths[os.real_path(os.dir(vf))] = true |
182 | | - if vf.contains('vweb.v') { |
183 | | - is_vweb_found = true |
| 182 | + if vf.contains('veb.v') { |
| 183 | + is_veb_found = true |
184 | 184 | } |
185 | 185 | } |
186 | 186 |
|
187 | | - if is_vweb_found { |
| 187 | + if is_veb_found { |
188 | 188 | if !os.args.any(it.starts_with('--only-watch')) { |
189 | 189 | context.only_watch = default_veb_suffixes.split_any(',') |
190 | | - // vweb is often used with SQLite .db or .sqlite3 files right next to the executable/source, |
191 | | - // that are updated by the vweb app, causing a restart of the app, which in turn causes the |
| 190 | + // veb is often used with SQLite .db or .sqlite3 files right next to the executable/source, |
| 191 | + // that are updated by the veb app, causing a restart of the app, which in turn causes the |
192 | 192 | // browser to reload the current page, that probably triggered the update in the first place. |
193 | 193 | // Note that the problem is not specific to SQLite, any database that stores its files in the |
194 | 194 | // current (project) folder, will also cause this. |
195 | | - println('`v watch` detected that you are compiling a vweb project.') |
| 195 | + println('`v watch` detected that you are compiling a veb project.') |
196 | 196 | println(' Because of that, the `--only-watch=${default_veb_suffixes}` flag was also implied.') |
197 | 197 | println(' In result, `v watch` will ignore changes to other files.') |
198 | 198 | println(' Add your own --only-watch filter, if you wish to override that choice.') |
|
0 commit comments