abzfarah / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

Documented files have no paths in generated file list #216

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. dir/file1.js has file overview
2. dir/file2.js has no file overview

What is the expected output?
File list contains "dir/file1.js" and "dir/file2.js"

What do you see instead?
File list contains "file1.js" and "dir/file2.js"

A fix.
When constructing the file overview symbol in Walker.js (line 91 for me),
give it a name:
symbol = new JSDOC.Symbol(JSDOC.Symbol.srcFile, [], "FILE", doc);

Original issue reported on code.google.com by ben%stec...@gtempaccount.com on 8 May 2009 at 5:13

GoogleCodeExporter commented 8 years ago
The problem with your solution is that while it will display a longer path to 
the source file, that path will be 
relative to where you are running JsDoc Toolkit, which may look odd to users if 
your build process involves a 
convoluted path from JsDoc Toolkit to your source files, for example it may 
look like ../../build/src/dir/file1.js

I understand that you and others may want to have a fuller path displayed but I 
don't want to suddenly force 
that upon everyone. So I'd suggest a more local place to implement what you 
want. In the template at 
jsdoc/allfiles.tmpl you can change line 27 from

    <h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2>
to

    <h2>{+new Link().toSrc(item.alias).withText(item.srcFile)+}</h2>

Obviously you can tweak item.srcFile at that point to strip out any particular 
directory names you don't want 
to display, but that would be something each user could customize as they 
wished.

Original comment by micmath on 21 Jun 2009 at 12:35