Closed johnspackman closed 5 years ago
Meta data docs are here: https://github.com/qooxdoo/qooxdoo-compiler/blob/master/docs/MetaData.md
@johnspackman Yes, qx contrib needs to be an API for sure. I had this on my list and was just about to start it because the yargs command files started too become to complex and code-redundant. Stay tuned.
api-viewer is ready and a contrib now.
This is now partially implemented, in that qooxdoo-compiler outputs a meta data file for every transpiled javascript source file, eg. there is a
transpiled/qx/core/Object.json
that describes everything about qx.core.Object including documentation in parsed JSDoc comments. This is a different format to the meta data which was output by the generator so the API viewer code will have to be modified to read it, but OTOH the format is much easier to read and parse so that should be a fairly straightforward task.Current ideas on packaging (see https://github.com/qooxdoo/qooxdoo/issues/9369) suggest that the API viewer should be repackaged as a contrib rather than part of the main distribution. So that this is easily accessible to users, it would be great to have the API viewer work by:
Where
qx api enable
is a one-time-only task, which is the equivalent ofqx contrib update && qx contrib add qooxdoo/qooxdoo-api-viewer
, then adding a new application incompile.json
referring to the API Viewer's Application class, and finallyqx compile
. This means that every timeqx compile
is run, the API viewer application is also updated.qx api run
would start a micro web server that the API Viewer application uses to load the meta data and display documentation.@cboulanger For this to be possible, qooxdoo-cli needs to be modified so that the
qx contrib
commands are available as a Javascript API and not just as as yargs commands. What do you think?