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
  84320a41_9e3d_47bb_81c8_644eff3ad8db["skips_ignore_files_outside_of_a_repo()"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19["scanner.rs"]
  84320a41_9e3d_47bb_81c8_644eff3ad8db -->|defined in| 6b48c515_a72f_7a7d_7ea7_b80f71a82b19
  56624ac4_6945_32d1_2b96_700de264829d["create_files_in()"]
  84320a41_9e3d_47bb_81c8_644eff3ad8db -->|calls| 56624ac4_6945_32d1_2b96_700de264829d
  0ffee7bc_8829_8e8e_00ee_4a8f4e4d9736["public_source_entry_from_pattern()"]
  84320a41_9e3d_47bb_81c8_644eff3ad8db -->|calls| 0ffee7bc_8829_8e8e_00ee_4a8f4e4d9736
  89cd8369_536c_74e5_91d1_719df04e4597["scan()"]
  84320a41_9e3d_47bb_81c8_644eff3ad8db -->|calls| 89cd8369_536c_74e5_91d1_719df04e4597
  style 84320a41_9e3d_47bb_81c8_644eff3ad8db 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