Home / Function/ build_with_cwd() — tailwindcss Function Reference

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
  3c346e29_23c0_e64d_64b3_11f2141e89bf["build_with_cwd()"]
  510a4ebc_9a2a_672a_2d6d_a56dabd1134b["dir.rs"]
  3c346e29_23c0_e64d_64b3_11f2141e89bf -->|defined in| 510a4ebc_9a2a_672a_2d6d_a56dabd1134b
  ea4007ac_a311_c454_45f6_4e3ba7192b1a["build()"]
  ea4007ac_a311_c454_45f6_4e3ba7192b1a -->|calls| 3c346e29_23c0_e64d_64b3_11f2141e89bf
  style 3c346e29_23c0_e64d_64b3_11f2141e89bf 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

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