cancel
Showing results for 
Search instead for 
Did you mean: 

JSDoc HTML generation via SAP HANA WEB IDE: Problem analyzing some .js files

Former Member
0 Kudos

Dear SAP community,

during the documentation of SAP UI 5 Developments I encountered an issue.

Our web application is split according to the MVC logic and I store "view" and "controller" seperately.


I want to make use of the functionality of having any comments of "JS Doc" type, i.e. "./*** lorem ipsum ... ***/" stored as .html documentation.

However, during the generation I encounter the problem that exactly one of the "controller" + "view" pairs (out of ~8) cannot be analyzed.

The JSDoc query seems to detect the files (as they appear in the JSDoc .html output) but fails to read the specific comments.

In the documentation .html, the headline tag, e.g. <h2> XY.Controller.js </h2> is created, but no functions are read.


Is there any common error? I have tried editing the encoding (currently UTF-8)

My current attempts to narrow down the problem:

  • When i copy/pasted the code into a seperate file and tried to generate a JSDoc from it, it was unable to read the file.

Thus, my initial idea was that it could be that some part of the code contains an invalid character.

Also, it would be interesting to see the SAP HANA JSDoc Configuration file. Maybe a certain "include" or "exclude" pattern is set? How can I access it?

All helpful comments are appreciated!

Sincerely

Simon

Accepted Solutions (0)

Answers (1)

Answers (1)

Attila
Active Participant
0 Kudos

Hallo Simon,

I would like to ask you to help and explain, how do you manage the generation in mass? I've just installed JSDoc on windows, and want to generate documentation form my whole UI5 project. Is there a way to tell JSDoc using command line to generate documentation for my whole project, or do I need to do it one by one manually for each js file in the project.

I'm using SAP WebIDE and looking for the simplest way to generate documentation.

Thanks, Attila

P.S.:It would be great to have a built in option available in the WebIDE to generate JSDoc froma  project

Former Member
0 Kudos

Hi Atilla,

you can just right-click the entire project and generate documentation for it. The resulting documentation will be put into a subfolder called "doc". At least thats how it worked for me.

This does not work for you?

Sincerely

Simon

Attila
Active Participant
0 Kudos

Hi Simon,

after installing nodeJS on windows, I've installed nodeJS using npm install -g

After that, I'm able to execute jsdoc generation in command prompt for single files specifying the js file location, but not for the whole UI5 project folder/file downloaded from SAP WebIDE using the context menu in windows. Are you using linux ? Any advice is welcome regarding isntallation

Thanks, Attila

P.S.: I've tries with option -r (recurse), but only the file I specified as argument for JSDoc was processed.