Home / Function/ add() — tailwindcss Function Reference

add() — tailwindcss Function Reference

Architecture documentation for the add() function in types.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  5900390a_db50_8a9e_5b91_55ac3d46e8bf["add()"]
  585ea68a_8593_dd5c_f5ba_0e299344c417["build()"]
  585ea68a_8593_dd5c_f5ba_0e299344c417 -->|calls| 5900390a_db50_8a9e_5b91_55ac3d46e8bf
  0dca21a1_0683_76d3_3acc_27f258ad5822["add_def()"]
  0dca21a1_0683_76d3_3acc_27f258ad5822 -->|calls| 5900390a_db50_8a9e_5b91_55ac3d46e8bf
  ac2befb9_2a18_4a42_41ca_9a7fabcc87db["add_defaults()"]
  ac2befb9_2a18_4a42_41ca_9a7fabcc87db -->|calls| 5900390a_db50_8a9e_5b91_55ac3d46e8bf
  style 5900390a_db50_8a9e_5b91_55ac3d46e8bf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/types.rs lines 417–431

    pub fn add(&mut self, name: &str, glob: &str) -> Result<(), Error> {
        if name == "all" || !name.chars().all(|c| c.is_alphanumeric()) {
            return Err(Error::InvalidDefinition);
        }
        let (key, glob) = (name.to_string(), glob.to_string());
        self.types
            .entry(key)
            .or_insert_with(|| FileTypeDef {
                name: name.to_string(),
                globs: vec![],
            })
            .globs
            .push(glob);
        Ok(())
    }

Domain

Subdomains

Frequently Asked Questions

What does add() do?
add() is a function in the tailwindcss codebase.
What calls add()?
add() is called by 3 function(s): add_def, add_defaults, build.

Analyze Your Own Codebase

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

Try Supermodel Free