Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/webui-dev-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ This crate provides primitives that any WebUI dev server can compose:
its own actix handler, generates the matching browser-side `<script>`,
and injects it before `</body>`.
- **`watch::spawn_watcher`** — Debounced filesystem watcher backed by
`notify`. Calls a closure once per debounce window.
`notify`. Calls a closure once per debounce window. When watched inputs
change, call `WatcherHandle::retarget` instead of replacing the watcher:
dropping a watcher discards events still inside its debounce window.
- **`spawn_rebuild_worker`** — Coalesces watcher ticks and runs rebuilds on an
owned `RebuildWorker`. Give the watcher a sender from `worker.sender()`, keep
the worker alive while serving, then stop the watcher and call
Expand Down
5 changes: 3 additions & 2 deletions crates/webui-dev-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
//!
//! - [`LiveReload`] / [`livereload::sse_handler`] — Server-Sent Events
//! broadcaster and actix handler for browser auto-reload.
//! - [`watch::spawn_watcher`] — debounced filesystem watcher.
//! - [`watch::spawn_watcher`] — debounced filesystem watcher, retargeted in
//! place with [`watch::WatcherHandle::retarget`].
//! - [`path`] — segment-aware basePath stripping and traversal-safe path
//! resolution.
//! - [`reporter::RebuildReporter`] — terminal UX for rebuild loops
Expand All @@ -32,5 +33,5 @@ pub mod worker;
pub use livereload::{sse_handler, LiveReload, ReloadEvent};
pub use reporter::{local_hms, RebuildReporter};
pub use serve::{serve_file_response, serve_static_file, NotFoundStrategy, StaticServeConfig};
pub use watch::{default_ignore_paths, spawn_watcher, WatchConfig, WatcherHandle};
pub use watch::{default_ignore_paths, spawn_watcher, WatchConfig, WatchTargets, WatcherHandle};
pub use worker::{spawn_rebuild_worker, RebuildError, RebuildWorker, TickSender};
Loading
Loading