refactor: move codeframe to @vue/shared

This commit is contained in:
Evan You 2019-11-06 15:13:15 -05:00
parent d9c6ff372c
commit acbbe3298c
6 changed files with 5 additions and 8 deletions

View File

@ -99,7 +99,6 @@ export {
} from './errors'
export * from './ast'
export * from './utils'
export * from './codeframe'
export { registerRuntimeHelpers } from './runtimeHelpers'
// expose transforms so higher-order compilers can import and extend them

View File

@ -23,14 +23,11 @@ import {
isObject,
NO,
makeMap,
isPromise
isPromise,
generateCodeFrame
} from '@vue/shared'
import { SuspenseBoundary } from './components/Suspense'
import {
CompilerError,
CompilerOptions,
generateCodeFrame
} from '@vue/compiler-dom'
import { CompilerError, CompilerOptions } from '@vue/compiler-core'
export type Data = { [key: string]: unknown }

View File

@ -1,4 +1,4 @@
import { generateCodeFrame } from '../src'
import { generateCodeFrame } from '../src/codeframe'
describe('compiler: codeframe', () => {
const source = `

View File

@ -3,6 +3,7 @@ import { makeMap } from './makeMap'
export { makeMap }
export * from './patchFlags'
export { isGloballyWhitelisted } from './globalsWhitelist'
export { generateCodeFrame } from './codeframe'
export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__
? Object.freeze({})