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 c4ca7b21_5816_64c1_0689_6eb483b1a4b3["build_with_cwd()"] f9057141_74ef_29d7_b851_a214bdc6bfa9["build()"] f9057141_74ef_29d7_b851_a214bdc6bfa9 -->|calls| c4ca7b21_5816_64c1_0689_6eb483b1a4b3 style c4ca7b21_5816_64c1_0689_6eb483b1a4b3 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
Called By
Source
Frequently Asked Questions
What does build_with_cwd() do?
build_with_cwd() is a function in the tailwindcss codebase.
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