Documentation for non-gi JavaScript
Context: I made a contribution that I wanted to document for visibility but it's not current possible. See gjs#263 (comment 570382). I'm also frustrated sometimes having to jump between places to find what I'm looking for. So I'm starting a conversation around documentation for non-gi JavaScript and see if I can help.
Here is the list of "official" documentation:
-
https://gitlab.gnome.org/GNOME/gjs/tree/master/doc (
Cairo
andByteArray
) -
https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Modules.md (
overrides
andmodules
) -
https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Mapping.md (
gi
mapping) -
https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Package/Specification.md (
imports.package
) -
https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Logging.md (
log()
,logError()
,print()
andprinterr()
) -
https://gjs-docs.gnome.org (
gi
, src) - gjs$33 (GJS Objects)
- gjs$32 ( System module )
As far as I can tell there are 4 different types of JavaScript code that should be documented.
globals
, overrides
(which also extend GObjects), modules
and std
(ES support/syntax/behavior).
Would be great to have the same space for looking up gjs documentation. Should it be https://gjs-docs.gnome.org or is it intended as a gi reference only? I found a multi-language gi/GNOME documentation once (can't find it anymore) I though it was really handy.
How can we automate this? JSDoc?
There is also:
- https://gjs-tutorial.readthedocs.io/en/latest/
- https://gjs-guide.gitlab.io/guides/
- https://www.gtk.org/docs/language-bindings/javascript/
- https://developer.gnome.org/gnome-devel-demos/stable/js.html.en
that it could be nice to merge with.