这个和 Jetbins 的vue-docgen-web-types
区别是升级了一下vue-docgen-api
的版本,使其更好的支持vue3
作用:用于解决自定全局 vue3 组件在 webstorm 中无法智能提示的问题
注意: 默认只会对 src/components
目录下的 vue 文件生成web-types
. 详见源代码src/config.ts
安装: npm i @pzy915/vue-docgen-web-types -D
使用:
- 以下内容添加到
package.json
"scripts": {
"update-web-types": "vue-docgen-web-types"
},
"web-types": "./web-types.json",
- 运行
npm run update-web-types
命令。
This package provides vue-docgen-web-types
command to generate web-types
JSON based on source components. It parses JSDoc using
styleguidist vue-docgen-api
package.
You can launch builder in a watch mode by passing --watch
and
you can pass a custom configuration file via --config
parameter.
See config.d.ts
for detailed information on supported configuration file options.