Home / Function/ genNormalScriptCssVarsCode() — vue Function Reference

genNormalScriptCssVarsCode() — vue Function Reference

Architecture documentation for the genNormalScriptCssVarsCode() function in cssVars.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  cea5366c_e3c9_28ae_a8fc_2d496c97c902["genNormalScriptCssVarsCode()"]
  16b5f9ed_1e09_eff8_5797_7cb90fc86d37["compileScript()"]
  16b5f9ed_1e09_eff8_5797_7cb90fc86d37 -->|calls| cea5366c_e3c9_28ae_a8fc_2d496c97c902
  31882be9_2c41_9ebd_3833_95fb4363ddb5["genCssVarsCode()"]
  cea5366c_e3c9_28ae_a8fc_2d496c97c902 -->|calls| 31882be9_2c41_9ebd_3833_95fb4363ddb5
  style cea5366c_e3c9_28ae_a8fc_2d496c97c902 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/cssVars.ts lines 160–179

export function genNormalScriptCssVarsCode(
  cssVars: string[],
  bindings: BindingMetadata,
  id: string,
  isProd: boolean
): string {
  return (
    `\nimport { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue'\n` +
    `const __injectCSSVars__ = () => {\n${genCssVarsCode(
      cssVars,
      bindings,
      id,
      isProd
    )}}\n` +
    `const __setup__ = __default__.setup\n` +
    `__default__.setup = __setup__\n` +
    `  ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\n` +
    `  : __injectCSSVars__\n`
  )
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does genNormalScriptCssVarsCode() do?
genNormalScriptCssVarsCode() is a function in the vue codebase.
What does genNormalScriptCssVarsCode() call?
genNormalScriptCssVarsCode() calls 1 function(s): genCssVarsCode.
What calls genNormalScriptCssVarsCode()?
genNormalScriptCssVarsCode() is called by 1 function(s): compileScript.

Analyze Your Own Codebase

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

Try Supermodel Free