Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using tutorial (jsdoc -u) fails because tutorial's render object data is missing 'filename' property #29

Open
ephaeton opened this issue Nov 3, 2014 · 2 comments

Comments

@ephaeton
Copy link

ephaeton commented Nov 3, 2014

Ever stumbled over something like this:

undefined:55
((__t=( filename ))==null?'':__t)+
        ^
ReferenceError: filename is not defined
    at eval (eval at <anonymous> (/usr/lib/node_modules/jsdoc/node_modules/underscore/underscore.js:1262:16), <anonymous>:55:9)
    at template (/usr/lib/node_modules/jsdoc/node_modules/underscore/underscore.js:1270:21)
    at exports.Template.partial (/usr/lib/node_modules/jsdoc/lib/jsdoc/template.js:62:29)
    at exports.Template.render (/usr/lib/node_modules/jsdoc/lib/jsdoc/template.js:81:24)
     .....

Well, then you've been using the -u switch, eh? Problem is that the template in tmpl/layout.tmpl uses the unbound javascript variable filename, which then, per underscore.js's template documentation, requires an object passed in with a property named filename as well.

You're doing this well for the other kinds of renderings, but not for the tutorials.

I fixed the problem locally by defining a property filename with value filename (the parameter for the function generateTutorial) on the tutorialData object, in publish.js around line 490.

nbargnesi added a commit to nbargnesi/jaguarjs-jsdoc that referenced this issue Feb 26, 2015
@Deathsteps
Copy link

So, is it fixed in the newest version?

@levithomason
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants