File tree 1 file changed +1
-28
lines changed
1 file changed +1
-28
lines changed Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
3
- import { extend } from 'shared/util'
4
- import { compile as baseCompile , baseOptions } from 'weex/compiler/index'
5
- import { detectErrors } from 'compiler/error-detector'
6
-
7
- export function compile (
8
- template : string ,
9
- options ?: CompilerOptions
10
- ) : CompiledResult {
11
- options = options || { }
12
- const errors = [ ]
13
- // allow injecting modules/directives
14
- const baseModules = baseOptions . modules || [ ]
15
- const modules = options . modules
16
- ? baseModules . concat ( options . modules )
17
- : baseModules
18
- const directives = options . directives
19
- ? extend ( extend ( { } , baseOptions . directives ) , options . directives )
20
- : baseOptions . directives
21
- const compiled = baseCompile ( template , {
22
- modules,
23
- directives,
24
- warn : msg => {
25
- errors . push ( msg )
26
- }
27
- } )
28
- compiled . errors = errors . concat ( detectErrors ( compiled . ast ) )
29
- return compiled
30
- }
3
+ export { compile } from 'weex/compiler/index'
You can’t perform that action at this time.
0 commit comments