Home / Function/ get_globs() — tailwindcss Function Reference

get_globs() — tailwindcss Function Reference

Architecture documentation for the get_globs() function in mod.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  30241c6c_c2a1_a080_6e9f_6ed92044019e["get_globs()"]
  6fc6e572_e476_ad9b_5f94_76ef88bfc436["scan_sources()"]
  30241c6c_c2a1_a080_6e9f_6ed92044019e -->|calls| 6fc6e572_e476_ad9b_5f94_76ef88bfc436
  style 30241c6c_c2a1_a080_6e9f_6ed92044019e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/scanner/mod.rs lines 365–399

    pub fn get_globs(&mut self) -> Vec<GlobEntry> {
        if let Some(globs) = &self.globs {
            return globs.clone();
        }

        self.scan_sources();

        let mut globs = vec![];
        for source in self.sources.iter() {
            match source {
                SourceEntry::Auto { base } | SourceEntry::External { base } => {
                    globs.extend(resolve_globs(
                        base.to_path_buf(),
                        &self.dirs,
                        &self.extensions,
                    ));
                }
                SourceEntry::Pattern { base, pattern } => {
                    globs.push(GlobEntry {
                        base: base.to_string_lossy().to_string(),
                        pattern: pattern.to_string(),
                    });
                }
                _ => {}
            }
        }

        // Re-optimize the globs to reduce the number of patterns we have to scan.
        globs = optimize_patterns(&globs);

        // Track the globs for subsequent calls
        self.globs = Some(globs.clone());

        globs
    }

Domain

Subdomains

Frequently Asked Questions

What does get_globs() do?
get_globs() is a function in the tailwindcss codebase.
What does get_globs() call?
get_globs() calls 1 function(s): scan_sources.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free