jsdoc.conf.json 2.6 KB

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