build() — tailwindcss Function Reference
Architecture documentation for the build() function in walk.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD de47c3c4_7919_326b_65e2_dcc7c2bd96c6["build()"] b3ca296d_790b_9bf3_23ea_56e5c5c48565["walk.rs"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|defined in| b3ca296d_790b_9bf3_23ea_56e5c5c48565 1c879887_8821_ee3a_d1d4_abfeca5c95df["build_parallel()"] 1c879887_8821_ee3a_d1d4_abfeca5c95df -->|calls| de47c3c4_7919_326b_65e2_dcc7c2bd96c6 d811da94_c4f9_9e35_657b_c71a6455675f["add_ignore()"] d811da94_c4f9_9e35_657b_c71a6455675f -->|calls| de47c3c4_7919_326b_65e2_dcc7c2bd96c6 2fac315b_03e7_57c2_6ff7_9d2992a1a71a["new()"] 2fac315b_03e7_57c2_6ff7_9d2992a1a71a -->|calls| de47c3c4_7919_326b_65e2_dcc7c2bd96c6 b2d9feab_5e1a_a1ee_dc95_cd3038d14bc7["visit()"] b2d9feab_5e1a_a1ee_dc95_cd3038d14bc7 -->|calls| de47c3c4_7919_326b_65e2_dcc7c2bd96c6 dcd6b4af_7222_0d2a_ba97_81396acc8fb1["walk_collect()"] dcd6b4af_7222_0d2a_ba97_81396acc8fb1 -->|calls| de47c3c4_7919_326b_65e2_dcc7c2bd96c6 07e16f89_ccb3_32a6_a52e_f34e7c66916d["first_path_not_symlink()"] 07e16f89_ccb3_32a6_a52e_f34e7c66916d -->|calls| de47c3c4_7919_326b_65e2_dcc7c2bd96c6 3a541649_c3fb_d65b_d3d2_beddc2d36691["follow_links()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| 3a541649_c3fb_d65b_d3d2_beddc2d36691 a9ee3ce7_a88e_113e_778c_1bf1eac0ce02["same_file_system()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| a9ee3ce7_a88e_113e_778c_1bf1eac0ce02 466239bd_07fe_994f_d859_99f5e2331524["max_depth()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| 466239bd_07fe_994f_d859_99f5e2331524 e0b5dad8_4fe0_795f_87ad_e89081f90b0b["min_depth()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| e0b5dad8_4fe0_795f_87ad_e89081f90b0b f1382949_cfc4_a873_7f70_f27a16b9b7b4["file_name()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| f1382949_cfc4_a873_7f70_f27a16b9b7b4 eaa93251_8ff2_5e1b_adef_2cb61588bdb0["path()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| eaa93251_8ff2_5e1b_adef_2cb61588bdb0 6af14e61_8f0b_c760_15f0_580b156285cf["get_or_set_current_dir()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| 6af14e61_8f0b_c760_15f0_580b156285cf style de47c3c4_7919_326b_65e2_dcc7c2bd96c6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/ignore/src/walk.rs lines 564–613
pub fn build(&self) -> Walk {
let follow_links = self.follow_links;
let max_depth = self.max_depth;
let min_depth = self.min_depth;
let sorter = self.sorter.clone();
let its = self
.paths
.iter()
.map(move |p| {
if p == Path::new("-") {
(p.to_path_buf(), None)
} else {
let mut wd = WalkDir::new(p);
wd = wd.follow_links(follow_links || p.is_file());
wd = wd.same_file_system(self.same_file_system);
if let Some(max_depth) = max_depth {
wd = wd.max_depth(max_depth);
}
if let Some(min_depth) = min_depth {
wd = wd.min_depth(min_depth);
}
if let Some(ref sorter) = sorter {
match sorter.clone() {
Sorter::ByName(cmp) => {
wd = wd.sort_by(move |a, b| cmp(a.file_name(), b.file_name()));
}
Sorter::ByPath(cmp) => {
wd = wd.sort_by(move |a, b| cmp(a.path(), b.path()));
}
}
}
(p.to_path_buf(), Some(WalkEventIter::from(wd)))
}
})
.collect::<Vec<_>>()
.into_iter();
let ig_root = self
.get_or_set_current_dir()
.map(|cwd| self.ig_builder.build_with_cwd(Some(cwd.to_path_buf())))
.unwrap_or_else(|| self.ig_builder.build());
Walk {
its,
it: None,
ig_root: ig_root.clone(),
ig: ig_root.clone(),
max_filesize: self.max_filesize,
skip: self.skip.clone(),
filter: self.filter.clone(),
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does build() do?
build() is a function in the tailwindcss codebase, defined in crates/ignore/src/walk.rs.
Where is build() defined?
build() is defined in crates/ignore/src/walk.rs at line 564.
What does build() call?
build() calls 7 function(s): file_name, follow_links, get_or_set_current_dir, max_depth, min_depth, path, same_file_system.
What calls build()?
build() is called by 6 function(s): add_ignore, build_parallel, first_path_not_symlink, new, visit, walk_collect.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free