Home / File/ index.ts — vue Source File

index.ts — vue Source File

Architecture documentation for index.ts, a typescript file in the vue codebase. 10 imports, 3 dependents.

File typescript WebPlatform RuntimeModules 10 imports 3 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  1f23f9a8_908f_4fb5_cd0e_f6931084f349["index.ts"]
  468af96f_b7ec_e775_664d_30df2088630f["patch.ts"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 468af96f_b7ec_e775_664d_30df2088630f
  72ec008b_b63e_cd79_66ff_0a6020716719["index.ts"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 72ec008b_b63e_cd79_66ff_0a6020716719
  370f887a_671c_0a30_6345_0f97fc69bd9e["index.ts"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 370f887a_671c_0a30_6345_0f97fc69bd9e
  adf7629d_f83f_946e_1b4a_9cf3b1b01ef1["index"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> adf7629d_f83f_946e_1b4a_9cf3b1b01ef1
  7937fbf2_2517_3f42_44b3_0dbdf16af5de["config"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 7937fbf2_2517_3f42_44b3_0dbdf16af5de
  156bf2e1_8a13_f22d_5437_54f14bcef8fa["util"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 156bf2e1_8a13_f22d_5437_54f14bcef8fa
  e6c67061_4b79_a1e0_e3f6_f14a5605d414["lifecycle"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> e6c67061_4b79_a1e0_e3f6_f14a5605d414
  02e43f4a_da65_7acd_5a98_0f017554a159["index"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 02e43f4a_da65_7acd_5a98_0f017554a159
  148abdbd_b24a_66f6_25f5_6786df341ad2["index"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 148abdbd_b24a_66f6_25f5_6786df341ad2
  907f4994_ea28_43b1_7976_0db9f0e97637["component"]
  1f23f9a8_908f_4fb5_cd0e_f6931084f349 --> 907f4994_ea28_43b1_7976_0db9f0e97637
  e1100d69_6461_2f61_a642_a1a89a6c3c01["entry-runtime-esm.ts"]
  e1100d69_6461_2f61_a642_a1a89a6c3c01 --> 1f23f9a8_908f_4fb5_cd0e_f6931084f349
  b3311756_c02f_6369_8f1f_ceb0fdb45a13["entry-runtime.ts"]
  b3311756_c02f_6369_8f1f_ceb0fdb45a13 --> 1f23f9a8_908f_4fb5_cd0e_f6931084f349
  65cd287e_4e6a_7361_27b7_9f8be7ceff8e["runtime-with-compiler.ts"]
  65cd287e_4e6a_7361_27b7_9f8be7ceff8e --> 1f23f9a8_908f_4fb5_cd0e_f6931084f349
  style 1f23f9a8_908f_4fb5_cd0e_f6931084f349 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import Vue from 'core/index'
import config from 'core/config'
import { extend, noop } from 'shared/util'
import { mountComponent } from 'core/instance/lifecycle'
import { devtools, inBrowser } from 'core/util/index'

import {
  query,
  mustUseProp,
  isReservedTag,
  isReservedAttr,
  getTagNamespace,
  isUnknownElement
} from 'web/util/index'

import { patch } from './patch'
import platformDirectives from './directives/index'
import platformComponents from './components/index'
import type { Component } from 'types/component'

// install platform specific utils
Vue.config.mustUseProp = mustUseProp
Vue.config.isReservedTag = isReservedTag
Vue.config.isReservedAttr = isReservedAttr
Vue.config.getTagNamespace = getTagNamespace
Vue.config.isUnknownElement = isUnknownElement

// install platform runtime directives & components
extend(Vue.options.directives, platformDirectives)
extend(Vue.options.components, platformComponents)

// install platform patch function
Vue.prototype.__patch__ = inBrowser ? patch : noop

// public mount method
Vue.prototype.$mount = function (
  el?: string | Element,
  hydrating?: boolean
): Component {
  el = el && inBrowser ? query(el) : undefined
  return mountComponent(this, el, hydrating)
}

// devtools global hook
/* istanbul ignore next */
if (inBrowser) {
  setTimeout(() => {
    if (config.devtools) {
      if (devtools) {
        devtools.emit('init', Vue)
      } else if (__DEV__ && process.env.NODE_ENV !== 'test') {
        // @ts-expect-error
        console[console.info ? 'info' : 'log'](
          'Download the Vue Devtools extension for a better development experience:\n' +
            'https://github.com/vuejs/vue-devtools'
        )
      }
    }
    if (
      __DEV__ &&
      process.env.NODE_ENV !== 'test' &&
      config.productionTip !== false &&
      typeof console !== 'undefined'
    ) {
      // @ts-expect-error
      console[console.info ? 'info' : 'log'](
        `You are running Vue in development mode.\n` +
          `Make sure to turn on production mode when deploying for production.\n` +
          `See more tips at https://vuejs.org/guide/deployment.html`
      )
    }
  }, 0)
}

export default Vue

Domain

Subdomains

Functions

Dependencies

Frequently Asked Questions

What does index.ts do?
index.ts is a source file in the vue codebase, written in typescript. It belongs to the WebPlatform domain, RuntimeModules subdomain.
What functions are defined in index.ts?
index.ts defines 1 function(s): $mount.
What does index.ts depend on?
index.ts imports 10 module(s): component, config, index, index, index, index.ts, index.ts, lifecycle, and 2 more.
What files import index.ts?
index.ts is imported by 3 file(s): entry-runtime-esm.ts, entry-runtime.ts, runtime-with-compiler.ts.
Where is index.ts in the architecture?
index.ts is located at src/platforms/web/runtime/index.ts (domain: WebPlatform, subdomain: RuntimeModules, directory: src/platforms/web/runtime).

Analyze Your Own Codebase

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

Try Supermodel Free