test.ts — vue Source File
Architecture documentation for test.ts, a typescript file in the vue codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6492da22_1068_8233_1f15_320aee5e9f51["test.ts"] 451106ad_39e7_1c30_4a13_bb292ee7299e["./index"] 6492da22_1068_8233_1f15_320aee5e9f51 --> 451106ad_39e7_1c30_4a13_bb292ee7299e 2ebf76ce_89b4_3571_ce9b_7e1df4491d9e["../client-plugin"] 6492da22_1068_8233_1f15_320aee5e9f51 --> 2ebf76ce_89b4_3571_ce9b_7e1df4491d9e c64e1cc1_6160_dd69_25a0_7bd48fe8420e["../server-plugin"] 6492da22_1068_8233_1f15_320aee5e9f51 --> c64e1cc1_6160_dd69_25a0_7bd48fe8420e a59766a0_1bfb_6896_0093_c03936fa4763["webpack"] 6492da22_1068_8233_1f15_320aee5e9f51 --> a59766a0_1bfb_6896_0093_c03936fa4763 94acb223_b521_4c40_3c9e_e3c1d203ccb3["fs"] 6492da22_1068_8233_1f15_320aee5e9f51 --> 94acb223_b521_4c40_3c9e_e3c1d203ccb3 c84dbba3_d7de_baba_4cde_8d5f3f74afa9["."] 6492da22_1068_8233_1f15_320aee5e9f51 --> c84dbba3_d7de_baba_4cde_8d5f3f74afa9 style 6492da22_1068_8233_1f15_320aee5e9f51 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue, { VNode, VNodeDirective } from '../../../types/index'
import VueSSRClientPlugin from '../client-plugin'
import VueSSRServerPlugin from '../server-plugin'
import webpack from 'webpack'
import { readFileSync } from 'fs'
import { createRenderer, createBundleRenderer } from '.'
function createApp(context: any) {
return new Vue({
data: {
url: context.url
},
template: `<div>The visited URL is: {{ url }}</div>`
})
}
// Renderer test
const app = createApp({ url: 'http://localhost:8000/' })
const renderer = createRenderer({
template: readFileSync('./index.template.html', 'utf-8')
})
const context = {
title: 'Hello',
meta: `
<meta name="description" content="Vue.js SSR Example">
`
}
renderer.renderToString(app, (err, html) => {
if (err) throw err
const res: string = html
})
renderer.renderToString(app, context, (err, html) => {
if (err) throw err
const res: string = html
})
renderer
.renderToString(app)
.then(html => {
const res: string = html
})
.catch(err => {
throw err
})
renderer
.renderToString(app, context)
.then(html => {
const res: string = html
})
.catch(err => {
throw err
})
renderer.renderToStream(app, context).on('data', chunk => {
const html = chunk.toString()
// ... (74 more lines)
Domain
Subdomains
Classes
Dependencies
- .
- ../client-plugin
- ../server-plugin
- ./index
- fs
- webpack
Source
Frequently Asked Questions
What does test.ts do?
test.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, VDom subdomain.
What functions are defined in test.ts?
test.ts defines 2 function(s): bundleRenderer.shouldPreload, createApp.
What does test.ts depend on?
test.ts imports 6 module(s): ., ../client-plugin, ../server-plugin, ./index, fs, webpack.
Where is test.ts in the architecture?
test.ts is located at packages/server-renderer/types/test.ts (domain: VueCore, subdomain: VDom, directory: packages/server-renderer/types).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free