Last modified: 2013-11-15 20:08:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42143, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40143 - Implement auto-generated documentation for JavaScript resources
Implement auto-generated documentation for JavaScript resources
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Documentation (Other open bugs)
1.20.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Krinkle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 20:47 UTC by spage
Modified: 2013-11-15 20:08 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2012-09-10 20:47:25 UTC
The JavaScript code in core/resources has lots of Doxygen-style comments, but http://svn.mediawiki.org/doc/ displays nothing for it, I assume because it's not PHP.

I hoped this would be as simple as adding .js to FILE_PATTERNS in maintenance/Doxyfile... however I tried this locally and the only documentation it seems to generate for all the resources/*.js files that I checked is
   Variables
   function 	mw

It may be that mwdoc-filter.php needs to be adjusted for .js files, but it could be that .js files need to be pre-processed, see "For those working with JavaScript..." in http://www.stack.nl/~dimitri/doxygen/helpers.html
Comment 1 Matthew Flaschen 2012-12-28 03:41:49 UTC
I agree we should definitely do this.  We don't necessarily have to use Doxygen.  There are tools specifically for JavaScript.

JSDoc has been suggested before (http://www.mail-archive.com/wikitech-l@lists.wikimedia.org/msg09167.html).  If that doesn't work well, I've used YUIDoc in the past.

But the bottom line is we have to pick one, get it running, then go through and fix the comments (whatever we pick we'll at least have to make adjustments).

See also https://www.mediawiki.org/wiki/Requests_for_comment/Documentation_overhaul#Implementation_ideas (which is broader in scope).
Comment 2 Matthew Flaschen 2012-12-28 04:07:01 UTC
I've brought this up on wikitech: http://lists.wikimedia.org/pipermail/wikitech-l/2012-December/065348.html
Comment 3 Antoine "hashar" Musso (WMF) 2013-03-29 21:58:16 UTC
Krinkle has been working on it by using JSDuck. The preliminary version is available from https://doc.wikimedia.org/ then  MediaWiki (JS).  That points to https://doc.wikimedia.org/mediawiki-core/master/js/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links