jsdoc.conf.json 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {
  2. "opts": { //命令行参数,在配置文件中配置了就不要敲命令了
  3. "encoding": "utf8", //文件编码utf8
  4. "destination": "./o2web/api/", //输出目标文件夹
  5. "recurse": true, //是否递归抽取sorce/include配置的文件夹
  6. "template" : "./node_modules/@o2oa/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/o2_core/o2.js",
  21. "./o2web/source/x_desktop/js/o2m.api.js",
  22. "./o2web/source/o2_core/o2/xScript",
  23. "./o2web/source/x_component_process_Xform",
  24. "./o2web/source/x_component_cms_Xform",
  25. "./o2web/source/x_component_query_Query",
  26. // "./o2web/source/x_desktop/js/initialScriptText.js",
  27. // "./o2web/source/x_desktop/js/initialServiceScriptText.js",
  28. "./o2web/source/x_desktop/ssr/commonScript.js"
  29. ],
  30. "includePattern": ".+\\.js(doc|x)?$", //抽取的源文件名称正则表达式
  31. "excludePattern": "(^|\\/|\\\\)_" //排除的源文件正则表达式
  32. },
  33. "plugins": [ //启用插件
  34. "plugins/markdown", //把markdown转成html
  35. "plugins/summarize" //为每个doclet生成摘要
  36. ],
  37. "templates": { //模板参数
  38. "cleverLinks": false, //@link标签是否呈现为纯文本
  39. "monospaceLinks": false,
  40. "default": {
  41. "staticFiles": { //静态文件目录
  42. "include": [
  43. "./o2web/jsdoc_static"
  44. ]
  45. }
  46. }
  47. },
  48. "metadata": {
  49. "title": "O2OA API", //最终生成的文档中标题
  50. "title_prefix" : "O2OA API", //html title标题前缀
  51. "title_suffix" : " | O2OA开发平台" //标题后缀
  52. },
  53. "o2" : {
  54. "actionOutPath" : "./o2server/{actionRoot}/src/main/webapp/describe/jsdoc/{actionName}.json",
  55. //"actionOutPath" : "./o2web/jsdoc/{actionRoot}/{actionName}.json",
  56. "actionOutExamplePath" : "./o2web/jsdoc_static/actionOut/examples/{actionRoot}.json",
  57. "actionOutExampleTextPath" : "./o2web/jsdoc_static/actionOut/examples/text/{path}.txt",
  58. "actionOutExtensionPath" : "./o2web/jsdoc_static/actionOut/extensions/{actionRoot}.json"
  59. },
  60. "search" : {
  61. "enable" : true,
  62. "results_title" : "<span class='search-results-count'></span> results matching <span class='search-query'></span>",
  63. "no_results_title" : "No results matching '<span class='search-query'></span>'",
  64. "placeholder" : "输入关键字搜索"
  65. }
  66. }
  67. //执行命令: jsdoc -c ./o2web/jsdoc.conf.json -q version=v5.3.5