summaryrefslogtreecommitdiff
path: root/cli/tools/bundle.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-10-31 01:25:58 +0100
committerGitHub <noreply@github.com>2023-10-31 01:25:58 +0100
commit1713df13524ad20c6bd0413bcf4aa57adc3f9735 (patch)
treea558239a7f483cab10b83305b333d5ef9657bd3e /cli/tools/bundle.rs
parent48c5c3a3fb2f43716528db8915b36e55c411d94f (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/bundle.rs')
-rw-r--r--cli/tools/bundle.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tools/bundle.rs b/cli/tools/bundle.rs
index b36ff023a..0946c728b 100644
--- a/cli/tools/bundle.rs
+++ b/cli/tools/bundle.rs
@@ -31,10 +31,10 @@ pub async fn bundle(
if let Some(watch_flags) = &bundle_flags.watch {
util::file_watcher::watch_func(
flags,
- util::file_watcher::PrintConfig {
- job_name: "Bundle".to_string(),
- clear_screen: !watch_flags.no_clear_screen,
- },
+ util::file_watcher::PrintConfig::new(
+ "Bundle",
+ !watch_flags.no_clear_screen,
+ ),
move |flags, watcher_communicator, _changed_paths| {
let bundle_flags = bundle_flags.clone();
Ok(async move {