jsdoc.conf.json 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "opts": { //命令行参数,在配置文件中配置了就不要敲命令了
  3. "encoding": "utf8", //文件编码utf8
  4. "destination": "./o2web/jsdoc/", //输出目标文件夹
  5. "recurse": true, //是否递归抽取sorce/include配置的文件夹
  6. "template" : "./node_modules/tidy-jsdoc-o2", //模板路径
  7. "prism-theme": "prism-custom", //模板中的代码块样式主题
  8. "readme" : "./o2web/jsdoc_static/home/README.md" //首页
  9. //"tutorials": "./o2web/tutorials" //如果有教程,对应教程目录
  10. },
  11. "tags": {
  12. "allowUnknownTags": true, //允许jsdoc中未命名的标签
  13. "dictionaries": [ //标签库
  14. "jsdoc",
  15. "closure"
  16. ]
  17. },
  18. "source": {
  19. "include": [ //需要抽取文档的源文件夹
  20. "./o2web/source/x_component_process_Xform",
  21. "./o2web/source/x_component_cms_Xform",
  22. "./o2web/source/o2_core/o2/xScript"
  23. ],
  24. "includePattern": ".+\\.js(doc|x)?$", //抽取的源文件名称正则表达式
  25. "excludePattern": "(^|\\/|\\\\)_" //排除的源文件正则表达式
  26. },
  27. "plugins": [ //启用插件
  28. "plugins/markdown", //把markdown转成html
  29. "plugins/summarize" //为每个doclet生成摘要
  30. ],
  31. "templates": { //模板参数
  32. "cleverLinks": false, //@link标签是否呈现为纯文本
  33. "monospaceLinks": false,
  34. "default": {
  35. "staticFiles": { //静态文件目录
  36. "include": [
  37. "./o2web/jsdoc_static"
  38. ]
  39. }
  40. }
  41. },
  42. "metadata": {
  43. "title": "O2OA前台API" //最终生成的文档中标题
  44. },
  45. "o2" : {
  46. "actionOutPath" : "./o2server/{actionRoot}/src/main/webapp/describe/jsdoc/{actionName}.json",
  47. //"actionOutPath" : "./o2web/jsdoc/{actionRoot}/{actionName}.json",
  48. "actionOutExamplePath" : "./o2web/jsdoc_static/actionOut_examples/{actionRoot}.json"
  49. }
  50. }
  51. //执行命令: jsdoc -c ./o2web/jsdoc.conf.json -q version=v5.3.5