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 WebRuntime 10 imports 3 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  741f07d4_91fb_0d2e_19fb_525f8624bea6["index.ts"]
  fc4ee9b8_614e_6e81_8598_c3613de80501["patch.ts"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> fc4ee9b8_614e_6e81_8598_c3613de80501
  75e9abae_441c_ea84_6744_7c3ef7799d18["index.ts"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 75e9abae_441c_ea84_6744_7c3ef7799d18
  345cbf26_ec8f_2b4b_f075_66c927a0e755["index.ts"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 345cbf26_ec8f_2b4b_f075_66c927a0e755
  27d7f276_de8e_8ec6_a87d_75ad4c4aaceb["index"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 27d7f276_de8e_8ec6_a87d_75ad4c4aaceb
  a9349ba5_bc74_f03e_b748_41eb2dcc87a9["config"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> a9349ba5_bc74_f03e_b748_41eb2dcc87a9
  09aa5370_2caa_6b33_3f44_6ac5211bd11b["util"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 09aa5370_2caa_6b33_3f44_6ac5211bd11b
  7dd9c364_3c71_bace_8bec_7942694994c8["lifecycle"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 7dd9c364_3c71_bace_8bec_7942694994c8
  90a2398a_1498_3263_c62e_0c064dd2c9b3["index"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 90a2398a_1498_3263_c62e_0c064dd2c9b3
  28507de2_df66_4d38_8b45_3af459d16f77["index"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 28507de2_df66_4d38_8b45_3af459d16f77
  64c87498_c46a_6944_ab9d_8e45519852a8["component"]
  741f07d4_91fb_0d2e_19fb_525f8624bea6 --> 64c87498_c46a_6944_ab9d_8e45519852a8
  c5df86b2_4f07_cf01_7fc8_7b1658e7817a["entry-runtime-esm.ts"]
  c5df86b2_4f07_cf01_7fc8_7b1658e7817a --> 741f07d4_91fb_0d2e_19fb_525f8624bea6
  89b2c92a_36ca_0a44_ed37_3298d300c16d["entry-runtime.ts"]
  89b2c92a_36ca_0a44_ed37_3298d300c16d --> 741f07d4_91fb_0d2e_19fb_525f8624bea6
  04498845_3cc1_e86f_9070_0c7b23b88f7c["runtime-with-compiler.ts"]
  04498845_3cc1_e86f_9070_0c7b23b88f7c --> 741f07d4_91fb_0d2e_19fb_525f8624bea6
  style 741f07d4_91fb_0d2e_19fb_525f8624bea6 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, WebRuntime 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: WebRuntime, 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