refactor: move codeframe to @vue/shared
This commit is contained in:
parent
d9c6ff372c
commit
acbbe3298c
@ -99,7 +99,6 @@ export {
|
|||||||
} from './errors'
|
} from './errors'
|
||||||
export * from './ast'
|
export * from './ast'
|
||||||
export * from './utils'
|
export * from './utils'
|
||||||
export * from './codeframe'
|
|
||||||
export { registerRuntimeHelpers } from './runtimeHelpers'
|
export { registerRuntimeHelpers } from './runtimeHelpers'
|
||||||
|
|
||||||
// expose transforms so higher-order compilers can import and extend them
|
// expose transforms so higher-order compilers can import and extend them
|
||||||
|
@ -23,14 +23,11 @@ import {
|
|||||||
isObject,
|
isObject,
|
||||||
NO,
|
NO,
|
||||||
makeMap,
|
makeMap,
|
||||||
isPromise
|
isPromise,
|
||||||
|
generateCodeFrame
|
||||||
} from '@vue/shared'
|
} from '@vue/shared'
|
||||||
import { SuspenseBoundary } from './components/Suspense'
|
import { SuspenseBoundary } from './components/Suspense'
|
||||||
import {
|
import { CompilerError, CompilerOptions } from '@vue/compiler-core'
|
||||||
CompilerError,
|
|
||||||
CompilerOptions,
|
|
||||||
generateCodeFrame
|
|
||||||
} from '@vue/compiler-dom'
|
|
||||||
|
|
||||||
export type Data = { [key: string]: unknown }
|
export type Data = { [key: string]: unknown }
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { generateCodeFrame } from '../src'
|
import { generateCodeFrame } from '../src/codeframe'
|
||||||
|
|
||||||
describe('compiler: codeframe', () => {
|
describe('compiler: codeframe', () => {
|
||||||
const source = `
|
const source = `
|
@ -3,6 +3,7 @@ import { makeMap } from './makeMap'
|
|||||||
export { makeMap }
|
export { makeMap }
|
||||||
export * from './patchFlags'
|
export * from './patchFlags'
|
||||||
export { isGloballyWhitelisted } from './globalsWhitelist'
|
export { isGloballyWhitelisted } from './globalsWhitelist'
|
||||||
|
export { generateCodeFrame } from './codeframe'
|
||||||
|
|
||||||
export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__
|
export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__
|
||||||
? Object.freeze({})
|
? Object.freeze({})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user