Rust library to generate static websites
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

revert: dev server changes

+6 -26
+6 -26
crates/maudit-cli/src/dev.rs
··· 18 18 19 19 fn should_rebuild_for_event(event: &DebouncedEvent) -> bool { 20 20 event.paths.iter().any(|path| { 21 - println!("Checking path: {:?}, event: {:?}", path, event.kind); 22 21 should_watch_path(path) 23 22 && match event.kind { 24 23 // Only rebuild on actual content modifications, not metadata changes ··· 50 49 ("MAUDIT_DEV", "true"), 51 50 ("MAUDIT_QUIET", "true"), 52 51 ("CARGO_TERM_COLOR", "always"), 52 + ("RUSTFLAGS", "-Awarnings"), 53 53 ]) 54 54 .stderr(std::process::Stdio::piped()) 55 55 .spawn() ··· 110 110 let (tx, mut rx) = tokio::sync::mpsc::channel::<DebounceEventResult>(100); 111 111 112 112 let mut debouncer = new_debouncer( 113 - std::time::Duration::from_millis(20), 113 + std::time::Duration::from_millis(100), 114 114 None, 115 115 move |result: DebounceEventResult| { 116 116 tx.blocking_send(result).unwrap_or(()); ··· 119 119 120 120 debouncer 121 121 .watcher() 122 - .watch(&Path::new(cwd).join("src"), RecursiveMode::Recursive)?; 123 - 124 - debouncer 125 - .watcher() 126 - .watch(&Path::new(cwd).join("content"), RecursiveMode::Recursive)?; 127 - 128 - debouncer 129 - .watcher() 130 - .unwatch(&Path::new(cwd).join("target")) 131 - .ok(); 132 - debouncer 133 - .watcher() 134 - .unwatch(&Path::new(cwd).join(".git")) 135 - .ok(); 136 - debouncer 137 - .watcher() 138 - .unwatch(&Path::new(cwd).join("node_modules")) 139 - .ok(); 140 - debouncer 141 - .watcher() 142 - .unwatch(&Path::new(cwd).join("dist")) 143 - .ok(); 122 + .watch(Path::new(cwd), RecursiveMode::Recursive)?; 144 123 145 124 // Handle file events 146 125 tokio::spawn(async move { ··· 158 137 .collect(); 159 138 160 139 if !triggering_events.is_empty() { 161 - info!("File events: {} valid changes", triggering_events.len()); 140 + debug!("File events: {} valid changes", triggering_events.len()); 162 141 for event in &triggering_events { 163 142 for path in &event.paths { 164 - info!(" {:?}: {}", event.kind, path.display()); 143 + debug!(" {:?}: {}", event.kind, path.display()); 165 144 } 166 145 } 167 146 ··· 195 174 ("MAUDIT_DEV", "true"), 196 175 ("MAUDIT_QUIET", "true"), 197 176 ("CARGO_TERM_COLOR", "always"), 177 + ("RUSTFLAGS", "-Awarnings"), 198 178 ]) 199 179 .stdout(std::process::Stdio::inherit()) 200 180 .stderr(std::process::Stdio::piped())