abzfarah / jsdoc-toolkit

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

Use relative paths for javascript source file locations #230

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When jsDoc processes files, it does so using the absolute path to that
file.  So on the 'File Index' page where it lists all the files, it shows
the full path to all those files on the system where jsDoc was run.

Internally, it has stored the file under symbols/src/<full path with
underscores as separator>

It would be nice if the path were sanitized somehow as exposing the full
path of the build machine is long, untidy, and exposes information about
the build machine that might not be public.

The path relative to the input directory would be ideal to use, however in
the case where multiple files differing only by path exist something
trickier would have to be worked out.

Original issue reported on code.google.com by lindsay....@gmail.com on 13 Aug 2009 at 1:46

GoogleCodeExporter commented 8 years ago
Can you explain exactly where you are seeing this:

"exposes information about the build machine that might not be public."

I'm assuming you mean somewhere in the files generated by the templates, but it 
would be helpful if you 
included which one(s).

Original comment by micmath on 14 Aug 2009 at 3:56

GoogleCodeExporter commented 8 years ago
The file 'files.html' in root of the output directory contains references to 
the full 
paths of the source file e.g.:

<div>
<h2>

<a href="symbols/src/C__cygwin_home_Lindsay_repos_jaybird_aviarc-
data_framework_client_Toronto_api__Command.js.html">C:\cygwin\home\Lindsay\repos
\jayb
ird/aviarc-data/framework/client/Toronto/api/\Command.js</a></h2>               

<dl>
</dl>
</div>

The full path is exposed at part of the link to the file, and the file itself 
is 
given a name that includes the full path e.g.:

"C__cygwin_home_Lindsay_repos_jaybird_aviarc-
data_framework_client_Toronto_api__Command.js.html"

Original comment by lindsay....@gmail.com on 17 Aug 2009 at 1:09

GoogleCodeExporter commented 8 years ago
The file path which is being displayed is the "full path" only because that is 
how you are providing the paths to the JsDoc 
Toolkit application, but you have full control of that. You could, for example, 
change your working directory to C:\cygwin\home\Lindsay\repos\jaybird before 
generating your documentation. If you did that and provided a *relative 
path* to JsDoc Toolkit then the paths displayed in the 'files.js' should then 
all be relative to that directory as well.

(untested...)
cd C:\cygwin\home\Lindsay\repos\jaybird
java -jar path/to/jsrun.jar path/to/app/run.js -t=path/to/templates/jsdoc/ -r 
path/to/source/files

Original comment by micmath on 17 Aug 2009 at 10:14

GoogleCodeExporter commented 8 years ago
Thanks for clarifying this.  This was my mistake, I am using the ant task to 
run js-
docs and I thought I was passing relative paths but as it happens it was not...

Thanks, you can close the bug.

Original comment by lindsay....@gmail.com on 17 Aug 2009 at 9:14

GoogleCodeExporter commented 8 years ago
No problem.

Original comment by micmath on 18 Aug 2009 at 7:03