mirror of
https://github.com/youzan/vant.git
synced 2025-10-14 23:20:41 +00:00
chore: add vant-markdown-vetur package
This commit is contained in:
24
packages/vant-markdown-vetur/README.md
Normal file
24
packages/vant-markdown-vetur/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Vant Markdown Vetur
|
||||
|
||||
将 .md 文件转换成能描述 vue 组件的 .json 文件,供 vscode 插件 *vetur* 读取,从而可以在 vue 模版语法中拥有自动补全的功能。
|
||||
|
||||
## API
|
||||
|
||||
#### parseAndWrite
|
||||
|
||||
解析目录下所有匹配的文件,并输出为 tags.json 和 attributes.json
|
||||
|
||||
```ts
|
||||
interface Options {
|
||||
// 需要解析的文件夹路径
|
||||
path: PathLike;
|
||||
// 文件匹配正则
|
||||
test: RegExp;
|
||||
// 输出目录
|
||||
outputDir: string;
|
||||
// 递归的目录最大深度
|
||||
maxDeep?: number;
|
||||
// 解析出来的组件名前缀
|
||||
tagPrefix?: string;
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user