Home / File/ compileScript.ts — vue Source File

compileScript.ts — vue Source File

Architecture documentation for compileScript.ts, a typescript file in the vue codebase. 29 imports, 2 dependents.

File typescript SfcCompiler ScriptCompiler 29 imports 2 dependents 26 functions

Entity Profile

Dependency Diagram

graph LR
  c9346cac_54e3_f6ca_68a7_03c6e82c9609["compileScript.ts"]
  fcee39ec_18fe_7a99_fb49_d33db4d055a4["babelUtils.ts"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> fcee39ec_18fe_7a99_fb49_d33db4d055a4
  484ec320_49bc_b969_d86d_edc246af3234["walkIdentifiers"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 484ec320_49bc_b969_d86d_edc246af3234
  203503b8_22db_80c3_4c32_90580ed9ee87["isFunctionType"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 203503b8_22db_80c3_4c32_90580ed9ee87
  1a27e6b3_7515_332e_8d02_d958c72a568c["types.ts"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 1a27e6b3_7515_332e_8d02_d958c72a568c
  5d984136_f02d_b459_9f20_2306143d1d20["BindingMetadata"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 5d984136_f02d_b459_9f20_2306143d1d20
  fd729ff9_ab37_2b0a_f764_780a95167427["BindingTypes"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> fd729ff9_ab37_2b0a_f764_780a95167427
  0efbfda6_f2a2_633c_6405_ea7a32c8a88d["parseComponent.ts"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 0efbfda6_f2a2_633c_6405_ea7a32c8a88d
  12e2cd32_caec_3647_52d2_fbf5316b83b2["SFCDescriptor"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 12e2cd32_caec_3647_52d2_fbf5316b83b2
  a5598d19_277e_d3ac_bbb1_56eca7b99b5e["SFCScriptBlock"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> a5598d19_277e_d3ac_bbb1_56eca7b99b5e
  4737f55f_f5f5_3f4a_4740_cc6b9e6f750a["warn.ts"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 4737f55f_f5f5_3f4a_4740_cc6b9e6f750a
  e49b037f_d27b_861a_74e2_10d6a15d0ca4["warnOnce"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> e49b037f_d27b_861a_74e2_10d6a15d0ca4
  445bc304_0400_2ae2_a33b_eaa1d5e1788a["cssVars.ts"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 445bc304_0400_2ae2_a33b_eaa1d5e1788a
  ff14d2b7_217f_7b2c_a8cf_e648b225c4b8["genCssVarsCode"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> ff14d2b7_217f_7b2c_a8cf_e648b225c4b8
  3b99ed03_b8e9_f8e3_3a3a_885f324f52b7["genNormalScriptCssVarsCode"]
  c9346cac_54e3_f6ca_68a7_03c6e82c9609 --> 3b99ed03_b8e9_f8e3_3a3a_885f324f52b7
  style c9346cac_54e3_f6ca_68a7_03c6e82c9609 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import MagicString from 'magic-string'
import LRU from 'lru-cache'
import { walkIdentifiers, isFunctionType } from './babelUtils'
import { BindingMetadata, BindingTypes } from './types'
import { SFCDescriptor, SFCScriptBlock } from './parseComponent'
import {
  parse as _parse,
  parseExpression,
  ParserOptions,
  ParserPlugin
} from '@babel/parser'
import { generateCodeFrame } from 'compiler/codeframe'
import { camelize, capitalize, isBuiltInTag, makeMap } from 'shared/util'
import { parseHTML } from 'compiler/parser/html-parser'
import { baseOptions as webCompilerOptions } from 'web/compiler/options'
import {
  Node,
  Declaration,
  ObjectPattern,
  ObjectExpression,
  ArrayPattern,
  Identifier,
  ExportSpecifier,
  TSType,
  TSTypeLiteral,
  TSFunctionType,
  ObjectProperty,
  ArrayExpression,
  Statement,
  CallExpression,
  RestElement,
  TSInterfaceBody,
  Program,
  ObjectMethod,
  LVal,
  Expression
} from '@babel/types'
import { walk } from 'estree-walker'
import { RawSourceMap } from 'source-map'
import { warnOnce } from './warn'
import { isReservedTag } from 'web/util'
import { bindRE, dirRE, onRE, slotRE } from 'compiler/parser'
import { parseText } from 'compiler/parser/text-parser'
import { DEFAULT_FILENAME } from './parseComponent'
import {
  CSS_VARS_HELPER,
  genCssVarsCode,
  genNormalScriptCssVarsCode
} from './cssVars'
import { rewriteDefault } from './rewriteDefault'

// Special compiler macros
const DEFINE_PROPS = 'defineProps'
const DEFINE_EMITS = 'defineEmits'
const DEFINE_EXPOSE = 'defineExpose'
const WITH_DEFAULTS = 'withDefaults'

// constants
const DEFAULT_VAR = `__default__`

// ... (1857 more lines)

Domain

Subdomains

Frequently Asked Questions

What does compileScript.ts do?
compileScript.ts is a source file in the vue codebase, written in typescript. It belongs to the SfcCompiler domain, ScriptCompiler subdomain.
What functions are defined in compileScript.ts?
compileScript.ts defines 26 function(s): analyzeBindingsFromOptions, analyzeScriptBindings, canNeverBeRef, compileScript, extractEventNames, extractRuntimeEmits, extractRuntimeProps, genRuntimeEmits, getArrayExpressionKeys, getObjectExpressionKeys, and 16 more.
What does compileScript.ts depend on?
compileScript.ts imports 29 module(s): BindingMetadata, BindingTypes, SFCDescriptor, SFCScriptBlock, babelUtils.ts, codeframe, cssVars.ts, estree-walker, and 21 more.
What files import compileScript.ts?
compileScript.ts is imported by 2 file(s): parse.ts, parseComponent.ts.
Where is compileScript.ts in the architecture?
compileScript.ts is located at packages/compiler-sfc/src/compileScript.ts (domain: SfcCompiler, subdomain: ScriptCompiler, directory: packages/compiler-sfc/src).

Analyze Your Own Codebase

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

Try Supermodel Free