From 7fae3ebaf359bdf9bd2d955caf97a6ab35ec241c Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 22 Aug 2019 21:38:00 -0400 Subject: [PATCH] wip: adjust index exports --- packages/runtime-core/src/index.ts | 43 ++++++++++++++++++------------ 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 1c9bcd0b..70efa488 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -1,29 +1,38 @@ -// Types -export { VNode } from './vnode' -export { FunctionalComponent } from './component' -export { RendererOptions } from './createRenderer' -export { Slot, Slots } from './componentSlots' -export { PropType, ComponentPropsOptions } from './componentProps' +// Public API ------------------------------------------------------------------ -// API -export { - openBlock, - createBlock, - createVNode, - cloneVNode, - mergeProps -} from './vnode' -export { createComponent, getCurrentInstance } from './component' -export { createRenderer } from './createRenderer' +export { createComponent } from './component' export { nextTick } from './scheduler' export * from './apiReactivity' export * from './apiWatch' export * from './apiLifecycle' export * from './apiInject' +// Advanced API ---------------------------------------------------------------- + +// For raw render function users +export { + createVNode, + cloneVNode, + mergeProps, + openBlock, + createBlock +} from './vnode' // VNode type symbols export { Text, Empty, Fragment, Portal } from './vnode' - // VNode flags export { PublicPatchFlags as PatchFlags } from './patchFlags' export { PublicShapeFlags as ShapeFlags } from './shapeFlags' + +// For advanced plugins +export { getCurrentInstance } from './component' + +// For custom renderers +export { createRenderer } from './createRenderer' + +// Types ----------------------------------------------------------------------- + +export { VNode } from './vnode' +export { FunctionalComponent } from './component' +export { RendererOptions } from './createRenderer' +export { Slot, Slots } from './componentSlots' +export { PropType, ComponentPropsOptions } from './componentProps'