ZhIntlAST README
You need to create a new configuration file in the current directory:.zhIntl.json
Parameter
- excludeDirectories { Array }: Folder names that do not need to be filtered,
- excludeFiles { Array }: File names that do not need to be parsed
- exclude { Array }: File suffixes that do not need to be parsed
- extensions { Array }: The suffix name of the file that needs to be parsed
- plugins { Array }:
@babel/parser plugins
- containType { Array }: Type nodes to detect
- outFile { String }: Output file name
DEMO
vscode插件搜索ZhIntlAST 并安装
-
- 当前目录下新建配置文件
.zhIntl.json , 举例
{
"excludeDirectories": ["api", "__tests__"], // 不需要过滤的文件夹名
"excludeFiles": ["messages.js"], // 不需要解析的文件名
"plugins": ["decorators-legacy"] // ast解析插件,如:decorators-legacy:修饰器语法解析插件
}
-
- 在
vscode 的命令面板, 输入zhintl 并选择zhintl
-
- 选择需要过滤的文件夹
-
- 直到提示
解析成功 则成功,当前目录下,会生成一个zhIntlAst_result.json 文件
0.0.1
功能
- 当前版本仅支持
js 、jsx 解析
- 暂不支持
css 、html 文件解析
0.0.2
commit
0.0.3
commit
- 更新:添加默认的ast解析插件:
jsx , classProperties
0.0.4
commit
- 更新:增加vscode最低版本判断:
v1.21.0
| |