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
  5ab8d17a_ba74_db1b_2294_0f070df2bac7["get_globs()"]
  b82a42d6_b7d3_c6d2_1e14_451f8382da81["mod.rs"]
  5ab8d17a_ba74_db1b_2294_0f070df2bac7 -->|defined in| b82a42d6_b7d3_c6d2_1e14_451f8382da81
  f04fc7f4_b2ad_75cf_e7ec_891de17532e6["scan_sources()"]
  5ab8d17a_ba74_db1b_2294_0f070df2bac7 -->|calls| f04fc7f4_b2ad_75cf_e7ec_891de17532e6
  style 5ab8d17a_ba74_db1b_2294_0f070df2bac7 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, defined in crates/oxide/src/scanner/mod.rs.
Where is get_globs() defined?
get_globs() is defined in crates/oxide/src/scanner/mod.rs at line 365.
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