vue3-yuanma/packages/compiler-sfc/src/index.ts

56 lines
1.4 KiB
TypeScript
Raw Normal View History

2019-11-07 10:58:15 +08:00
// API
export { parse } from './parse'
export { compileTemplate } from './compileTemplate'
export { compileStyle, compileStyleAsync } from './compileStyle'
export { compileScript } from './compileScript'
export { rewriteDefault } from './rewriteDefault'
export {
shouldTransform as shouldTransformRef,
transform as transformRef,
transformAST as transformRefAST
} from '@vue/reactivity-transform'
2019-11-07 10:58:15 +08:00
2021-03-28 13:35:45 +08:00
// Utilities
export { parse as babelParse } from '@babel/parser'
import MagicString from 'magic-string'
export { MagicString }
// technically internal but we want it in @vue/repl, cast it as any to avoid
// relying on estree types
import { walk as _walk } from 'estree-walker'
export const walk = _walk as any
2021-08-24 01:55:06 +08:00
export {
generateCodeFrame,
walkIdentifiers,
extractIdentifiers,
isInDestructureAssignment,
isStaticProperty
} from '@vue/compiler-core'
2021-03-28 13:35:45 +08:00
2019-11-07 10:58:15 +08:00
// Types
export {
SFCParseOptions,
SFCParseResult,
2019-11-07 10:58:15 +08:00
SFCDescriptor,
SFCBlock,
SFCTemplateBlock,
SFCScriptBlock,
2022-05-10 09:50:12 +08:00
SFCStyleBlock
2019-11-07 10:58:15 +08:00
} from './parse'
export {
TemplateCompiler,
2019-12-14 00:24:09 +08:00
SFCTemplateCompileOptions,
SFCTemplateCompileResults
} from './compileTemplate'
export {
SFCStyleCompileOptions,
SFCAsyncStyleCompileOptions,
SFCStyleCompileResults
} from './compileStyle'
2020-07-11 10:12:25 +08:00
export { SFCScriptCompileOptions } from './compileScript'
export { AssetURLOptions, AssetURLTagConfig } from './templateTransformAssetUrl'
export {
CompilerOptions,
CompilerError,
BindingMetadata
} from '@vue/compiler-core'