Cordova docs-gen proposal


Cordova plugins documentation currently live separated from source code so that sync issues can occur on commits. Proposed solution uses JSDoc to generate a plugin API docs, while allows to wrap the generated docs into template (markdown with handlebars partials) with extra-details like Quirks or additional examples.

Libraries/frameworks used

Proposal is currently implemented for cordova-plugin-camera only: generated doc result.


  • A nice TOC helps in understanding what APIs are exposed,
  • A better structure for args with a table showing default values,
  • Hyperlinks for type definitions,
  • Literate programming makes sense - docs & code remain together,
  • A common plugin template that is shared among all cordova official plugins including basic details such as:
    • How to install,
    • Where to file bugs,
    • Where to discuss design questions,
    • Provide a pointer to slack plugins community,
    • Buildbot badge.


  • Requires a generation script before every commit

Summary instructions: