jaguarjs-jsdoc icon indicating copy to clipboard operation
jaguarjs-jsdoc copied to clipboard

Error using template

Open RWOverdijk opened this issue 10 years ago • 3 comments

I'm trying to set up jsdoc3 with jaguarjs, and it seems to not want to listen to me. At all.

I simply cloned https://github.com/davidshimjs/jaguarjs-jsdoc into the dir I'm working in, and created a config file in the same dir:

{
  "plugins": [ "plugins/markdown" ],
  "markdown": {
    "parser": "gfm"
  },
  "opts": {
    "template" : "jaguarjs-jsdoc",
    "recurse": true,
    "tutorials": "./tutorials",
    "destination": "./documentation"
  }
}

Then ran jsdoc: jsdoc -c jsdoc.json src/*

Just to get:

rwoverdijk@battlestation ~/projects/nodejs/islnew/tier3/assets/scripts/islive.io (master)
$ jsdoc -c jsdoc.json src/*

undefined:55
((__t=( filename ))==null?'':__t)+
        ^
ReferenceError: filename is not defined
    at eval (eval at <anonymous> (/usr/local/lib/node_modules/jsdoc/node_modules/underscore/underscore.js:1262:16), <anonymous>:55:9)
    at template (/usr/local/lib/node_modules/jsdoc/node_modules/underscore/underscore.js:1270:21)
    at exports.Template.partial (/usr/local/lib/node_modules/jsdoc/lib/jsdoc/template.js:62:29)
    at exports.Template.render (/usr/local/lib/node_modules/jsdoc/lib/jsdoc/template.js:81:24)
    at generateTutorial (/Users/rwoverdijk/projects/nodejs/islnew/tier3/assets/scripts/islive.io/jaguarjs-jsdoc/publish.js:501:25)
    at /Users/rwoverdijk/projects/nodejs/islnew/tier3/assets/scripts/islive.io/jaguarjs-jsdoc/publish.js:512:13
    at Array.forEach (native)
    at saveChildren (/Users/rwoverdijk/projects/nodejs/islnew/tier3/assets/scripts/islive.io/jaguarjs-jsdoc/publish.js:511:23)
    at Object.exports.publish (/Users/rwoverdijk/projects/nodejs/islnew/tier3/assets/scripts/islive.io/jaguarjs-jsdoc/publish.js:516:5)
    at Object.module.exports.cli.generateDocs (/usr/local/lib/node_modules/jsdoc/cli.js:412:18)

I'm using version:

rwoverdijk@battlestation ~/projects/nodejs/islnew/tier3/assets/scripts/islive.io (master)
$ jsdoc -v
JSDoc 3.3.0-alpha9 (Sat, 28 Jun 2014 15:26:03 GMT)

I also tried master, with no success.

RWOverdijk avatar Jul 02 '14 05:07 RWOverdijk

I also hit a problem (not the same error above) when running this against jsdoc v3.3.0ALPHA8... I tried it against jsdoc 3.2.2 and it worked...Maybe it will work for you as well.. I have been finding some issues with jsdoc v3.3.0, so I'm sticking to 3.2.2 for now. Sad that a npm install jsdoc defaults to the alpha versions...

purtuga avatar Jul 02 '14 17:07 purtuga

I have the same issue. And it is linked to the presence of tutorials. If you remove it from the config, things will works.

Is there a way to have some feedback from the developer of the template?

The layout of my test-project is: project-home

|-- tut
|     |-- tut1.md
|     +--tut1.json
|-- jsdocconf.json
+-- Gruntfile.js

tut1.md

# Title 1
Text text text

tut1.json

{
    "title": "Tutorial 1"
}

jsdocconf.json

{
    "tags": {
        "allowUnknownTags" : true
    },
    "templates": {
        "cleverLinks": true,
        "monospaceLinks": true,
        "default": {
            "outputSourceFiles" : true
        },
        "applicationName": "SaphirJS",
        "disqus": "",
        "googleAnalytics": "",
        "linenums": false
    }
}

Gruntfile.js

        jsdoc: {
            all: {
                src: [
                    './src/main/js/**/*.js',
                ],
                options: {
                    destination: 'doc',
                    tutorials: './tut'
                    template : "node_modules/jaguarjs-jsdoc",
                    configure : "jsdocconf.json",
                },
            }
        },

ouadi avatar Oct 20 '14 13:10 ouadi

It doesn't appear this project is being maintained, however, there is a solution on SO for anyone looking.

levithomason avatar Oct 11 '15 00:10 levithomason