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
  ca6eb787_41dd_a6ba_52d2_2c0744d074f3["get_globs()"]
  d865d4fd_bb15_6d9a_a900_10e82a6856fb["mod.rs"]
  ca6eb787_41dd_a6ba_52d2_2c0744d074f3 -->|defined in| d865d4fd_bb15_6d9a_a900_10e82a6856fb
  98a265b3_e586_5ffa_483e_55b79182bfbc["scan_sources()"]
  ca6eb787_41dd_a6ba_52d2_2c0744d074f3 -->|calls| 98a265b3_e586_5ffa_483e_55b79182bfbc
  style ca6eb787_41dd_a6ba_52d2_2c0744d074f3 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