0.0.5 • Published 2 years ago
@clasp/code-analysis v0.0.5
1. 安装插件
默认安装的插件
1. apiMap: 收集代码中所有使用过的 API
2. browserMap根据传入的 browserApis 收集浏览器 API-
3. methodMap从 API 中过滤出 哪些是函数
4. typeMap从 API 中过滤出 哪些是 ts 类型
2. 根据传入的配置(scanSource)获取指定 ts/tsx 文件
this.scanCode
this.scanFiles3. 解析每一个ts文件,将其转化为AST
const { ast, checker } = parseTs(filePath);4. 遍历 AST 分析 import 节点
this.findImportItems(ast, filePath);5. 遍历 AST 分析 API 调用
this.dealAST0.0.5
2 years ago
0.0.4
2 years ago
0.0.4-alpha.0
2 years ago
0.0.3-alpha.0
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago