workflow: log options in template-explorer

This commit is contained in:
Evan You 2020-11-20 17:16:28 -05:00
parent 8ac2241b22
commit acba86ef45
2 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@ import * as m from 'monaco-editor'
import { compile, CompilerError, CompilerOptions } from '@vue/compiler-dom'
import { compile as ssrCompile } from '@vue/compiler-ssr'
import { compilerOptions, initOptions, ssrMode } from './options'
import { watchEffect } from '@vue/runtime-dom'
import { toRaw, watchEffect } from '@vue/runtime-dom'
import { SourceMapConsumer } from 'source-map'
import theme from './theme'
@ -67,6 +67,7 @@ window.init = () => {
errors.filter(e => e.loc).map(formatError)
)
console.log(`AST: `, ast)
console.log(`Options: `, toRaw(compilerOptions))
lastSuccessfulCode = code + `\n\n// Check the console for the AST`
lastSuccessfulMap = new SourceMapConsumer(map!)
lastSuccessfulMap!.computeColumnSpans()

View File

@ -16,6 +16,7 @@ export const compilerOptions: CompilerOptions = reactive({
bindingMetadata: {
TestComponent: BindingTypes.SETUP_CONST,
setupRef: BindingTypes.SETUP_REF,
setupConst: BindingTypes.SETUP_CONST,
setupLet: BindingTypes.SETUP_LET,
setupMaybeRef: BindingTypes.SETUP_MAYBE_REF,
setupProp: BindingTypes.PROPS