ludorival / vscode-preview-jsdoc

VSCode extension to automatically preview the generated jsdoc
MIT License
6 stars 1 forks source link

include is ignored from jsdoc conf.json #22

Closed LukasWillin closed 5 years ago

LukasWillin commented 5 years ago

Hi Ludovic! 🙌

So I tested the new version and I'm happy to report the relative path works great!

But it seems that the conf file is now at least partially ignored: It only outputs the current folder without subfolders which it previously didnt if you configured something like "include": [ "src/tell/*" ] (Which is the root folder of my source code and it would parse all contents).

Version Info

tool version
node v11.0.0
npm 6.4.1
jsdoc JSDoc 3.5.5 (Thu, 14 Sep 2017 02:51:54 GMT)
vscode-preview-jsdoc 2.0.4

jsdocconf.json

{
  "plugins": [ ],
  "recurseDepth": 20,
  "source": {
    "exclude": [
      "node_modules",
      "dist",
      "lib",
      "spec",
      "jasmine",
      "wiki",
      "src/babel/"
    ],
    "includePattern": ".+\\.js(doc|x)?$",
    "excludePattern": "(^|\\/|\\\\)_",
    "include": [
      "src/tell"
    ]
  },
  "sourceType": "module",
  "tags": {
    "allowUnknownTags": true,
    "dictionaries": [
      "jsdoc",
      "closure"
    ]
  },
  "templates": {
    "cleverLinks": true,
    "monospaceLinks": false
  },
  "opts": {
    "encoding": "utf8",
    "recurse": true,
    "verbose": true,
    "destination": "wiki/www"
  }
}

Workspace Settings

"settings": {
  "previewjsdoc.confFile": "jsdocconf.json",
  "previewjsdoc.withPrivate": true,
  "previewjsdoc.output": "wiki"
}

Cheers Lukas

LukasWillin commented 5 years ago

Okay I just did some more testing.

So the new setting you introduced previewjsdoc.confFile does not accept or interpretate the path as expected: It seems to only accept static paths. But when you set a relative path for the output it kind of defeats the purpous when you cant do that for the confFile-path as well.

So as it stands now this is accepted C:/Projects/Tell.js/jsdocconf.json and I can live with that for now. But I think it would be necessary to accept relative paths from the project root folder here as well such that you can point to the confFile like jsdocconf.json (Where Tell.js is the project root).

Cheers Lukas

ludorival commented 5 years ago

Hi Lukas, Good catch for your issue, I fixed and reinforced the tests to prevent this kind of issue. I am intending to remove the autoOpenBrowser setting since I found after all this is more annoying to open the browser each time a .js or .json is saved. I created an issue #23. What do you think ?