JSDoc Setup: can someone post their conf file please? [Solved]

Hello,

Has anyone got JSDoc setup from the npm package direct as opposed to meteor-jsdoc?

I’m using node 4.6 LTS while meteor-jsdoc uses a newer node so bad things happen. Any pointers, i can install it fine and setup the conf file fine. I setup the conf to create the docs outside the project folder (no issues), but cannot exclude things properly. So it starts to check all the node packages and then it shits itself…

tl;dr: share conf file for clean jsdoc (not meteor-jsdoc) on a meteor project pretty please?

Thanks so much.

Tat

Maybe this helps:

Look here for the JSDocs:

https://radgrad.gitbooks.io/radgrad-manual/content/api/jsdocs/

2 Likes

much appreciated. I’m having a look at the jsdoc.json and will give it a shot.

also, your code is so shiny! my code looks like ass in comparison…

this worked really well, than you so much.

For anyone else who needs this:
(1) Install jsdoc globally. Note: I like to keep my global clean, but chimp and jsdoc are exceptions.
(2) Setup a jsdoc.json, mine is below:
(3) Use jsdoc -c jsdoc.json. Note: no need for the -r tag as it is specified in the conf.

/* Config file for the docdash theme for jsdoc . */
{
  "tags": {
    "allowUnknownTags": true
  },
  "source": {
    "include": [
      "imports/api"
    ],
    "exclude": [
      ".git",
      ".meteor",
      "node_modules"
    ],
    "includePattern": ".+\\.js(x|doc)?$"
  },
  "plugins": ["plugins/markdown"],
  "opts": {
    "encoding": "utf8",
    "template": "templates/default",
    "destination": "../docs/app4/",
    "recurse": true,
    "verbose": true
  },
  "markdown": {
    "parser": "gfm",
    "hardwrap": true
  },
  "templates": {
    "cleverLinks": false,
    "monospaceLinks": false,
    "default": {
      "outputSourceFiles": true,
      "includeDate": true
    }
  }
}

Hi All,

To anyone who might find this useful. Given usage of newer versions of JS, give this a go.

Using the babel all over the place, this caused a lot of problems which were fixed by this package. I used the below between ‘source’ and ‘opts’.

  "plugins": ["plugins/markdown", "node_modules/jsdoc-babel"],
  "babel": {
    "extensions": ["js", "es6", "jsx"],
    "presets": ["es2015", "es2015-loose", "stage-1"]
  },