refactor: layout optional features

This commit is contained in:
Evan You 2018-09-25 17:55:47 -04:00
parent 7484b4d2e6
commit b12247d638
6 changed files with 13 additions and 12 deletions

View File

@ -1,21 +1,22 @@
// render api // Core API
export { h, Fragment, Portal } from './h' export { h, Fragment, Portal } from './h'
export { Component } from './component'
export { cloneVNode, createPortal, createFragment } from './vdom' export { cloneVNode, createPortal, createFragment } from './vdom'
export { createRenderer } from './createRenderer' export { createRenderer } from './createRenderer'
export { Component } from './component'
// observer api // Observer API
export * from '@vue/observer' export * from '@vue/observer'
// scheduler api // Scheduler API
export { nextTick } from '@vue/scheduler' export { nextTick } from '@vue/scheduler'
// internal api // Internal API
export { createComponentInstance } from './componentUtils' export { createComponentInstance } from './componentUtils'
// import-on-demand apis // Optional APIs
export { applyDirective } from './directive' // these are imported on-demand and can be tree-shaken
export { Provide, Inject } from './context' export { applyDirective } from './optional/directive'
export { Provide, Inject } from './optional/context'
// flags & types // flags & types
export { ComponentClass, FunctionalComponent } from './component' export { ComponentClass, FunctionalComponent } from './component'

View File

View File

@ -1,6 +1,6 @@
import { observable } from '@vue/observer' import { observable } from '@vue/observer'
import { Component } from './component' import { Component } from '../component'
import { Slots } from './vdom' import { Slots } from '../vdom'
const contextStore = observable() as Record<string, any> const contextStore = observable() as Record<string, any>

View File

@ -1,5 +1,5 @@
import { VNode } from './vdom' import { VNode } from '../vdom'
import { MountedComponent } from './component' import { MountedComponent } from '../component'
export interface DirectiveBinding { export interface DirectiveBinding {
instance: MountedComponent instance: MountedComponent

View File