Skip to content

Commit

Permalink
feat(transformer): 加入 isNormal 参数,直接返回 ast
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jun 21, 2018
1 parent 7b17165 commit 7e81930
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/taro-transformer-wx/src/index.ts
Expand Up @@ -13,7 +13,8 @@ export interface Options {
isApp: boolean,
path: string,
code: string,
isTyped: boolean
isTyped: boolean,
isNormal: boolean
}

export interface Result {
Expand Down Expand Up @@ -71,6 +72,9 @@ export default function transform<T> (options: Options): TransformResult {
] as any[]
}
}).ast as t.File
if (options.isNormal) {
return { ast } as any
}
// transformFromAst(ast, code)
let result
const componentSourceMap = new Map<string, string[]>()
Expand Down

0 comments on commit 7e81930

Please sign in to comment.