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 CompilerSFC ScriptAnalyzer 29 imports 2 dependents 26 functions

Entity Profile

Dependency Diagram

graph LR
  b9f12a63_b611_1b00_0717_3ff21d7ce156["compileScript.ts"]
  946e0fa6_6c05_b820_0bd7_980d6d869192["babelUtils.ts"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 946e0fa6_6c05_b820_0bd7_980d6d869192
  6821e51e_382f_8ff8_ca9d_3b77f896018a["walkIdentifiers"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 6821e51e_382f_8ff8_ca9d_3b77f896018a
  2da3a667_48eb_9608_1220_cf672cac17b7["isFunctionType"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 2da3a667_48eb_9608_1220_cf672cac17b7
  1502a238_61f0_9afa_8c3c_71d2bb769820["types.ts"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 1502a238_61f0_9afa_8c3c_71d2bb769820
  3865741e_556d_ec8c_c327_fe6fdcb59cfd["BindingMetadata"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 3865741e_556d_ec8c_c327_fe6fdcb59cfd
  8fa13167_5ac7_0658_5752_38b3ee82910e["BindingTypes"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 8fa13167_5ac7_0658_5752_38b3ee82910e
  ecb7777f_63cc_7bf6_1f6a_fedf933d43a4["parseComponent.ts"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> ecb7777f_63cc_7bf6_1f6a_fedf933d43a4
  723c94a2_276b_7491_3957_5f4e8a659b73["SFCDescriptor"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 723c94a2_276b_7491_3957_5f4e8a659b73
  ef3c36f5_5866_75fd_3a1a_4fbe9c774913["SFCScriptBlock"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> ef3c36f5_5866_75fd_3a1a_4fbe9c774913
  1511bfca_4880_700d_193d_8660402396c3["warn.ts"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 1511bfca_4880_700d_193d_8660402396c3
  6364246b_4ca9_9d10_2feb_edc16524fcfd["warnOnce"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 6364246b_4ca9_9d10_2feb_edc16524fcfd
  b08241c7_738d_9e08_b885_fad82facd4f3["cssVars.ts"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> b08241c7_738d_9e08_b885_fad82facd4f3
  847be4cb_fc6a_9296_b72f_58b4cc679dd7["genCssVarsCode"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> 847be4cb_fc6a_9296_b72f_58b4cc679dd7
  ec134563_fe99_b34c_861f_267104e87086["genNormalScriptCssVarsCode"]
  b9f12a63_b611_1b00_0717_3ff21d7ce156 --> ec134563_fe99_b34c_861f_267104e87086
  style b9f12a63_b611_1b00_0717_3ff21d7ce156 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 CompilerSFC domain, ScriptAnalyzer 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: CompilerSFC, subdomain: ScriptAnalyzer, 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