feat(compiler): basic v-bind & v-on transforms

This commit is contained in:
Evan You
2019-09-22 22:19:42 -04:00
parent 3ab016e44f
commit 914087edea
14 changed files with 749 additions and 715 deletions

View File

@@ -6,6 +6,8 @@ import { isString } from '@vue/shared'
import { transformIf } from './transforms/vIf'
import { transformFor } from './transforms/vFor'
import { prepareElementForCodegen } from './transforms/element'
import { transformOn } from './transforms/vOn'
import { transformBind } from './transforms/vBind'
export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions
@@ -24,7 +26,8 @@ export function compile(
...(options.nodeTransforms || []) // user transforms
],
directiveTransforms: {
// TODO include built-in directive transforms
on: transformOn,
bind: transformBind,
...(options.directiveTransforms || {}) // user transforms
}
})