0

I've started working on an existing Cordova project, and I'm unfamiliar with both the codebase and the development framework. The project is not externally documented, which makes learning the codebase more difficult. I'm aware that there are programs like doxygen that should be able to generate documentation. I see that npm has a wrapper for Doxygen, but looking at its documentation I'm not sure how to apply it to a Cordova project.

How can I generate external documentation for an existing Cordova project?

albert
  • 8,285
  • 3
  • 19
  • 32
Galen
  • 1,128
  • 1
  • 14
  • 31
  • I assume you have the code locally present. Which language is Cordova written in? Just creat a doxygen configuration file (Doxyfile) in the root of your source tree by means of `doxygen -g` edit it and set `RECURSIV = YES` and `EXTRACT_ALL = YES` (and probably all other `EXTRACT_..` as well. Run doxygen (just `doxygen`) and you will get a html directory with an index.html – albert Apr 10 '20 at 18:30
  • When the language is javascript, you probably should follow the instructions as given in the wrapper you mentioned. – albert Apr 10 '20 at 18:32
  • @albert Yes, the project is within a local folder. – Galen Apr 10 '20 at 21:14
  • @albert Cordova itself is written in C#, C++, CSS, HTML, Java, JavaScript, and Objective-C https://en.wikipedia.org/wiki/Apache_Cordova – Galen Apr 10 '20 at 21:15
  • @albert However, I am mainly interested in the JavaScript if the scope of this question needs to be restricted. – Galen Apr 10 '20 at 21:16
  • @albert I attempted to use ```doxygen``` as you described, including changing the conifguration variables, however the final html doesn't seem to contain anything related to the Cordova project files. – Galen Apr 10 '20 at 21:17
  • @albert Note that I am interested in documentation for an existing Cordova project, not Cordova itself. – Galen Apr 10 '20 at 21:18
  • By the way in what language is your Cordova project written? Doxygen does not really support javascript but you cpuld add the `.js` to your `FILE_PATTERNS` and add `EXTENSION_MAPPING= js=javascript` and see what happens. Otherwise you you might use a filter that converts the source code to a language that doxygen does understand. – albert Apr 11 '20 at 07:39
  • The Cordova project is written in JavaScript... – Galen May 14 '20 at 21:19

0 Answers0