Home / Function/ skips_ignore_files_outside_of_a_repo() — tailwindcss Function Reference

skips_ignore_files_outside_of_a_repo() — tailwindcss Function Reference

Architecture documentation for the skips_ignore_files_outside_of_a_repo() function in scanner.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  70d9c9ff_f0f7_7ef0_b4ec_d31ebb4a94d9["skips_ignore_files_outside_of_a_repo()"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d["scanner.rs"]
  70d9c9ff_f0f7_7ef0_b4ec_d31ebb4a94d9 -->|defined in| 340ddba0_15e4_a309_9dea_cf6d6e73381d
  a055cb70_8b14_31db_b201_57369f5fda5a["create_files_in()"]
  70d9c9ff_f0f7_7ef0_b4ec_d31ebb4a94d9 -->|calls| a055cb70_8b14_31db_b201_57369f5fda5a
  773530fa_5b76_d390_68d3_405d48fbecf7["public_source_entry_from_pattern()"]
  70d9c9ff_f0f7_7ef0_b4ec_d31ebb4a94d9 -->|calls| 773530fa_5b76_d390_68d3_405d48fbecf7
  2f3305c3_ad36_6002_daa9_52b16e0424fd["scan()"]
  70d9c9ff_f0f7_7ef0_b4ec_d31ebb4a94d9 -->|calls| 2f3305c3_ad36_6002_daa9_52b16e0424fd
  style 70d9c9ff_f0f7_7ef0_b4ec_d31ebb4a94d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/tests/scanner.rs lines 1082–1243

    fn skips_ignore_files_outside_of_a_repo() {
        // Create a temporary working directory
        let dir = tempdir().unwrap().into_path();

        // Create files
        create_files_in(
            &dir,
            &[
                // This file should always be picked up
                ("home/project/apps/web/index.html", "content-['index.html']"),
                // Set up various ignore rules
                ("home/.gitignore", "ignore-home.html"),
                ("home/project/.gitignore", "ignore-project.html"),
                ("home/project/apps/.gitignore", "ignore-apps.html"),
                ("home/project/apps/web/.gitignore", "ignore-web.html"),
                // Some of these should be ignored depending on which dir is the repo root
                (
                    "home/project/apps/web/ignore-home.html",
                    "content-['ignore-home.html']",
                ),
                (
                    "home/project/apps/web/ignore-project.html",
                    "content-['ignore-project.html']",
                ),
                (
                    "home/project/apps/web/ignore-apps.html",
                    "content-['ignore-apps.html']",
                ),
                (
                    "home/project/apps/web/ignore-web.html",
                    "content-['ignore-web.html']",
                ),
                // Auto content detection outside of `web/`
                (
                    "home/project/apps/admin/index.html",
                    "content-['home/project/apps/admin/index.html']",
                ),
                // Manual sources outside of `web/`
                (
                    "home/project/apps/dashboard/index.html",
                    "content-['home/project/apps/dashboard/index.html']",
                ),
            ],
        );

        let sources = vec![
            public_source_entry_from_pattern(
                dir.join("home/project/apps/web")
                    .to_string_lossy()
                    .to_string()
                    .into(),
                "@source '**/*'",
            ),
            public_source_entry_from_pattern(
                dir.join("home/project/apps/web")
                    .to_string_lossy()
                    .to_string()
                    .into(),
                "@source '../admin'",
            ),
            public_source_entry_from_pattern(
                dir.join("home/project/apps/web")
                    .to_string_lossy()
                    .to_string()
                    .into(),
                "@source '../dashboard/*.html'",
            ),
        ];

        let candidates = Scanner::new(sources.clone()).scan();

        // All ignore files are applied because there's no git repo
        assert_eq!(
            candidates,
            vec![
                "content-['home/project/apps/admin/index.html']",
                "content-['home/project/apps/dashboard/index.html']",
                "content-['index.html']"
            ]
        );

Domain

Subdomains

Frequently Asked Questions

What does skips_ignore_files_outside_of_a_repo() do?
skips_ignore_files_outside_of_a_repo() is a function in the tailwindcss codebase, defined in crates/oxide/tests/scanner.rs.
Where is skips_ignore_files_outside_of_a_repo() defined?
skips_ignore_files_outside_of_a_repo() is defined in crates/oxide/tests/scanner.rs at line 1082.
What does skips_ignore_files_outside_of_a_repo() call?
skips_ignore_files_outside_of_a_repo() calls 3 function(s): create_files_in, public_source_entry_from_pattern, scan.

Analyze Your Own Codebase

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

Try Supermodel Free