[READ-ONLY] Mirror of https://github.com/danielroe/component-dts.
350 B
13 lines
1const { loadNuxt } = require('nuxt')
2
3async function init() {
4 // Assuming you've already built your project
5 const nuxt = await loadNuxt({ for: 'start' })
6 await nuxt.listen(3000)
7 const window = await nuxt.renderAndGetWindow('http://localhost:3000')
8 // Display the head `<title>`
9 console.log(window.document.title)
10 nuxt.close()
11}
12
13init()