Home / Function/ normalizePath() — tailwindcss Function Reference

normalizePath() — tailwindcss Function Reference

Architecture documentation for the normalizePath() function in normalize-path.ts from the tailwindcss codebase.

Function typescript NodeServer Compiler calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  1814a389_cfe2_00cf_bd4d_7fa2fc24143c["normalizePath()"]
  57241391_a529_5dd8_8832_b09118cb2fae["normalize-path.ts"]
  1814a389_cfe2_00cf_bd4d_7fa2fc24143c -->|defined in| 57241391_a529_5dd8_8832_b09118cb2fae
  7ac5591b_df87_a0ae_2005_4d18e64a288f["rewriteUrls()"]
  7ac5591b_df87_a0ae_2005_4d18e64a288f -->|calls| 1814a389_cfe2_00cf_bd4d_7fa2fc24143c
  d09344df_f73f_81c5_9800_c997f2e4f793["relativeToStylesheet()"]
  d09344df_f73f_81c5_9800_c997f2e4f793 -->|calls| 1814a389_cfe2_00cf_bd4d_7fa2fc24143c
  58844fda_0ab2_bc29_f897_6285c2810a31["normalizePathBase()"]
  1814a389_cfe2_00cf_bd4d_7fa2fc24143c -->|calls| 58844fda_0ab2_bc29_f897_6285c2810a31
  style 1814a389_cfe2_00cf_bd4d_7fa2fc24143c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-node/src/normalize-path.ts lines 33–47

export function normalizePath(originalPath: string) {
  let normalized = normalizePathBase(originalPath)

  // Make sure Windows network share paths are normalized properly
  // They have to begin with two slashes or they won't resolve correctly
  if (
    originalPath.startsWith('\\\\') &&
    normalized.startsWith('/') &&
    !normalized.startsWith('//')
  ) {
    return `/${normalized}`
  }

  return normalized
}

Domain

Subdomains

Frequently Asked Questions

What does normalizePath() do?
normalizePath() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-node/src/normalize-path.ts.
Where is normalizePath() defined?
normalizePath() is defined in packages/@tailwindcss-node/src/normalize-path.ts at line 33.
What does normalizePath() call?
normalizePath() calls 1 function(s): normalizePathBase.
What calls normalizePath()?
normalizePath() is called by 2 function(s): relativeToStylesheet, rewriteUrls.

Analyze Your Own Codebase

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

Try Supermodel Free