Home / Function/ it_should_ignore_negated_custom_sources() — tailwindcss Function Reference

it_should_ignore_negated_custom_sources() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  e27be45d_1ef1_e9a5_2117_03069f45d301["it_should_ignore_negated_custom_sources()"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d["scanner.rs"]
  e27be45d_1ef1_e9a5_2117_03069f45d301 -->|defined in| 340ddba0_15e4_a309_9dea_cf6d6e73381d
  a53d0655_c789_b0d9_0c48_cfd60da7194b["scan_with_globs()"]
  e27be45d_1ef1_e9a5_2117_03069f45d301 -->|calls| a53d0655_c789_b0d9_0c48_cfd60da7194b
  style e27be45d_1ef1_e9a5_2117_03069f45d301 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/tests/scanner.rs lines 844–913

    fn it_should_ignore_negated_custom_sources() {
        let ScanResult {
            candidates,
            files,
            globs,
            normalized_sources,
        } = scan_with_globs(
            &[
                ("src/index.ts", "content-['src/index.ts']"),
                ("src/colors/red.jsx", "content-['src/colors/red.jsx']"),
                ("src/colors/blue.tsx", "content-['src/colors/blue.tsx']"),
                ("src/colors/green.tsx", "content-['src/colors/green.tsx']"),
                ("src/utils/string.ts", "content-['src/utils/string.ts']"),
                ("src/utils/date.ts", "content-['src/utils/date.ts']"),
                ("src/utils/file.ts", "content-['src/utils/file.ts']"),
                (
                    "src/admin/foo/template.html",
                    "content-['src/admin/template.html']",
                ),
                (
                    "src/templates/index.html",
                    "content-['src/templates/index.html']",
                ),
            ],
            vec![
                "@source '**/*'",
                "@source not 'src/index.ts'",
                "@source not '**/*.{jsx,tsx}'",
                "@source not 'src/utils'",
                "@source not 'dist'",
            ],
        );

        assert_eq!(
            candidates,
            vec![
                "content-['src/admin/template.html']",
                "content-['src/templates/index.html']",
            ]
        );

        assert_eq!(
            files,
            vec![
                "src/admin/foo/template.html",
                "src/templates/index.html",
                // These files are ignored and thus do not need to be watched:

                // "src/colors/blue.tsx",
                // "src/colors/green.tsx",
                // "src/colors/red.jsx",
                // "src/index.ts",
                // "src/utils/date.ts",
                // "src/utils/file.ts",
                // "src/utils/string.ts"
            ]
        );
        assert_eq!(
            globs,
            vec![
                "*",
                "src/*/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}",
                "src/admin/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}",
                "src/colors/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}",
                "src/templates/**/*.{aspx,astro,cjs,cts,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,vue}",
            ]
        );

        assert_eq!(normalized_sources, vec!["**/*",]);
    }

Domain

Subdomains

Frequently Asked Questions

What does it_should_ignore_negated_custom_sources() do?
it_should_ignore_negated_custom_sources() is a function in the tailwindcss codebase, defined in crates/oxide/tests/scanner.rs.
Where is it_should_ignore_negated_custom_sources() defined?
it_should_ignore_negated_custom_sources() is defined in crates/oxide/tests/scanner.rs at line 844.
What does it_should_ignore_negated_custom_sources() call?
it_should_ignore_negated_custom_sources() calls 1 function(s): scan_with_globs.

Analyze Your Own Codebase

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

Try Supermodel Free