基本JSDoc配置文件无法按预期工作

时间:2019-04-01 11:30:52

标签: javascript jsdoc

我正在尝试使JSDoc工作,但是在超级基本设置方面遇到了很多麻烦:

这是我的配置文件:

{
"plugins": [],
"source": {
    "include": ["src/components"]
},
"sourceType": "module",
"tags": {
    "allowUnknownTags": true,
    "dictionaries": ["jsdoc","closure"]
},
"templates": {
    "cleverLinks": false,
    "monospaceLinks": false
},
"opts": {
    "destination": "./out/",
    "recurse": true
}
}

当我运行jsdoc -c conf.json时,它什么也没做。

如果我只是运行:jsdoc "src/components" -r,它将正常工作。

当我使用--debug时,它显示出配置上的差异:

带有配置文件:

DEBUG: Environment info:
{
  "env": {
    "conf": {
      "plugins": [],
      "recurseDepth": 10,
      "source": {
        "includePattern": ".+\\.js(doc|x)?$",
        "excludePattern": ""
      },
      "sourceType": "module",
      "tags": {
        "allowUnknownTags": true,
        "dictionaries": [
          "jsdoc",
          "closure"
        ]
      },
      "templates": {
        "monospaceLinks": false,
        "cleverLinks": false
      },
      "opts": {
        "_": [
          "src/components"
        ],
        "destination": "./out/",
        "recurse": true
      }
    },
    "opts": {
      "_": [],
      "configure": "docs/conf.json",
      "version": true,
      "debug": true,
      "destination": "./out/",
      "recurse": true,
      "encoding": "utf8"
    }
  }
}

没有配置文件:

DEBUG: Environment info: 
{
  "env": {
    "conf": {
      "plugins": [],
      "recurseDepth": 10,
      "source": {
        "includePattern": ".+\\.js(doc|x)?$",
        "excludePattern": "(^|\\/|\\\\)_"
      },
      "sourceType": "module",
      "tags": {
        "allowUnknownTags": true,
        "dictionaries": [
          "jsdoc",
          "closure"
        ]
      },
      "templates": {
        "monospaceLinks": false,
        "cleverLinks": false,
        "default": {
          "outputSourceFiles": true
        }
      }
    },
    "opts": {
      "_": [
        "./src/components"
      ],
      "recurse": true,
      "debug": true,
      "destination": "./out/",
      "encoding": "utf8"
    }
  }
}

0 个答案:

没有答案