依赖于jsdoc输出项目文档
- npm i -D free-jsdoc
module.exports = {
plugins: ['node_modules/free-jsdoc/jsdoc-vuejs'],
recurseDepth: 10,
source: {
include: 'src/components',
includePattern: '\\.vue$', // 将以.js, .vue结尾的文件作为源文件
excludePattern: '(^|\\/|\\\\)_',
},
sourceType: 'module',
tags: {
allowUnknownTags: true,
dictionaries: ['jsdoc', 'closure'],
},
templates: {
cleverLinks: false,
monospaceLinks: false,
useLongnameInNav: false,
showInheritedInNav: true,
},
opts: {
recurse: true, // 是否递归
verbose: false, // 是否输出详细信息
destination: 'docs', // 将生成的文放到指定目录下,如不指定,默认输出到 out 文件夹下
template: 'node_modules/free-jsdoc/clean-jsdoc-theme',
theme_opts: {
default_theme: 'dark', // or "light" // 修改主题,默认是 dark
search: true,
displayModuleHeader: false
},
},
};