diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-10-31 01:25:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-31 01:25:58 +0100 |
| commit | 1713df13524ad20c6bd0413bcf4aa57adc3f9735 (patch) | |
| tree | a558239a7f483cab10b83305b333d5ef9657bd3e /cli/tools/lint.rs | |
| parent | 48c5c3a3fb2f43716528db8915b36e55c411d94f (diff) | |
feat: deno run --unstable-hmr (#20876)
This commit adds `--unstable-hmr` flag, that enabled Hot Module Replacement.
This flag works like `--watch` and accepts the same arguments. If
HMR is not possible the process will be restarted instead.
Currently HMR is only supported in `deno run` subcommand.
Upon HMR a `CustomEvent("hmr")` will be dispatched that contains
information which file was changed in its `details` property.
---------
Co-authored-by: Valentin Anger <syrupthinker@gryphno.de>
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tools/lint.rs')
| -rw-r--r-- | cli/tools/lint.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cli/tools/lint.rs b/cli/tools/lint.rs index b7f4a3f0d..5b9387eb1 100644 --- a/cli/tools/lint.rs +++ b/cli/tools/lint.rs @@ -59,10 +59,7 @@ pub async fn lint(flags: Flags, lint_flags: LintFlags) -> Result<(), AnyError> { } file_watcher::watch_func( flags, - file_watcher::PrintConfig { - job_name: "Lint".to_string(), - clear_screen: !watch_flags.no_clear_screen, - }, + file_watcher::PrintConfig::new("Lint", !watch_flags.no_clear_screen), move |flags, watcher_communicator, changed_paths| { let lint_flags = lint_flags.clone(); Ok(async move { |
