build_with_cwd() — tailwindcss Function Reference
Architecture documentation for the build_with_cwd() function in dir.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD b82c9e59_9475_011e_5e4a_8402050b655f["build_with_cwd()"] a558c8e1_3e7c_59d2_b113_bacec65ba188["dir.rs"] b82c9e59_9475_011e_5e4a_8402050b655f -->|defined in| a558c8e1_3e7c_59d2_b113_bacec65ba188 767f0d1d_ed6b_2d39_ea17_d569e763e1dc["build()"] 767f0d1d_ed6b_2d39_ea17_d569e763e1dc -->|calls| b82c9e59_9475_011e_5e4a_8402050b655f style b82c9e59_9475_011e_5e4a_8402050b655f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/ignore/src/dir.rs lines 632–671
pub(crate) fn build_with_cwd(&self, cwd: Option<PathBuf>) -> Ignore {
let global_gitignores_relative_to =
cwd.or_else(|| self.global_gitignores_relative_to.clone());
let git_global_matcher = if !self.opts.git_global {
Gitignore::empty()
} else if let Some(ref cwd) = global_gitignores_relative_to {
let mut builder = GitignoreBuilder::new(cwd);
builder
.case_insensitive(self.opts.ignore_case_insensitive)
.unwrap();
let (gi, err) = builder.build_global();
if let Some(err) = err {
log::debug!("{}", err);
}
gi
} else {
log::debug!("ignoring global gitignore file because CWD is not known");
Gitignore::empty()
};
Ignore(Arc::new(IgnoreInner {
compiled: Arc::new(RwLock::new(HashMap::new())),
dir: self.dir.clone(),
overrides: self.overrides.clone(),
types: self.types.clone(),
parent: None,
is_absolute_parent: true,
absolute_base: None,
global_gitignores_relative_to,
explicit_ignores: Arc::new(self.explicit_ignores.clone()),
custom_ignore_filenames: Arc::new(self.custom_ignore_filenames.clone()),
custom_ignore_matcher: Gitignore::empty(),
ignore_matcher: Gitignore::empty(),
git_global_matcher: Arc::new(git_global_matcher),
git_ignore_matcher: Gitignore::empty(),
git_exclude_matcher: Gitignore::empty(),
has_git: false,
opts: self.opts,
}))
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does build_with_cwd() do?
build_with_cwd() is a function in the tailwindcss codebase, defined in crates/ignore/src/dir.rs.
Where is build_with_cwd() defined?
build_with_cwd() is defined in crates/ignore/src/dir.rs at line 632.
What calls build_with_cwd()?
build_with_cwd() is called by 1 function(s): build.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free