scan_sources() — tailwindcss Function Reference
Architecture documentation for the scan_sources() function in mod.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 6fc6e572_e476_ad9b_5f94_76ef88bfc436["scan_sources()"] f393909c_34c9_43c4_59ec_fe5fc5e381be["scan()"] f393909c_34c9_43c4_59ec_fe5fc5e381be -->|calls| 6fc6e572_e476_ad9b_5f94_76ef88bfc436 f3a88674_0546_da95_e1d1_27bf6255e088["get_files()"] f3a88674_0546_da95_e1d1_27bf6255e088 -->|calls| 6fc6e572_e476_ad9b_5f94_76ef88bfc436 30241c6c_c2a1_a080_6e9f_6ed92044019e["get_globs()"] 30241c6c_c2a1_a080_6e9f_6ed92044019e -->|calls| 6fc6e572_e476_ad9b_5f94_76ef88bfc436 style 6fc6e572_e476_ad9b_5f94_76ef88bfc436 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/scanner/mod.rs lines 316–352
fn scan_sources(&mut self) {
let Some(walker) = &mut self.walker else {
return;
};
for entry in walker.build().filter_map(Result::ok) {
let path = entry.into_path();
let Ok(metadata) = path.metadata() else {
continue;
};
if metadata.is_dir() {
self.dirs.push(path);
} else if metadata.is_file() {
let extension = path
.extension()
.and_then(|x| x.to_str())
.unwrap_or_default(); // In case the file has no extension
match extension {
// Special handing for CSS files, we don't want to extract candidates from
// these files, but we do want to extract used CSS variables.
"css" => {
self.css_files.push(path.clone());
}
_ => {
self.changed_content.push(ChangedContent::File(
path.to_path_buf(),
extension.to_owned(),
));
}
}
self.extensions.insert(extension.to_owned());
self.files.push(path);
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does scan_sources() do?
scan_sources() is a function in the tailwindcss codebase.
What calls scan_sources()?
scan_sources() is called by 3 function(s): get_files, get_globs, scan.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free