Gilles has submitted this change and it was merged.

Change subject: Adding first pass at jsduck docs
......................................................................


Adding first pass at jsduck docs

Interface, data model, and image all documented.

Change-Id: Id64da283c4bbeaae930103233f9e798b5a9db51b
---
A .gitignore
A docs/external.js
A docs/generate
A docs/jsduck-config.json
M resources/ext.multimediaViewer/ext.multimediaViewer.dataModel.js
M resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
6 files changed, 47 insertions(+), 5 deletions(-)

Approvals:
  Gilles: Verified; Looks good to me, approved



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b51ecd9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+docs/js/
diff --git a/docs/external.js b/docs/external.js
new file mode 100644
index 0000000..e670c92
--- /dev/null
+++ b/docs/external.js
@@ -0,0 +1,19 @@
+/**
+ * @class mw
+ * @singleton
+ * <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw>
+ */
+
+/**
+ * @class mw.Title
+ * <https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Title>
+ */
+
+/**
+ * @class mlb
+ * @singleton
+ */
+
+/**
+ * @class mlb.LightboxInterface
+ */
diff --git a/docs/generate b/docs/generate
new file mode 100755
index 0000000..d27dfeb
--- /dev/null
+++ b/docs/generate
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+jsduck \
+--config=$(pwd)/docs/jsduck-config.json \
+&& echo 'JSDuck execution finished.'
diff --git a/docs/jsduck-config.json b/docs/jsduck-config.json
new file mode 100644
index 0000000..d30c36f
--- /dev/null
+++ b/docs/jsduck-config.json
@@ -0,0 +1,12 @@
+{
+       "--title": "MultimediaViewer extension documentation",
+       "--footer": "Documentation for MultimediaViewer, an extension to 
MediaWiki. Generated on {DATE} by {JSDUCK} {VERSION}.",
+       "--builtin-classes": true,
+       "--output": "./js",
+       "--": [
+               "./external.js",
+               
"../resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js",
+               
"../resources/ext.multimediaViewer/ext.multimediaViewer.lightboximage.js",
+               
"../resources/ext.multimediaViewer/ext.multimediaViewer.dataModel.js"
+       ]
+}
diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.dataModel.js 
b/resources/ext.multimediaViewer/ext.multimediaViewer.dataModel.js
index 7e8376d..f77e3c2 100644
--- a/resources/ext.multimediaViewer/ext.multimediaViewer.dataModel.js
+++ b/resources/ext.multimediaViewer/ext.multimediaViewer.dataModel.js
@@ -109,7 +109,7 @@
                this.longitude = longitude;
 
                /**
-                * @property {object} thumbUrls
+                * @property {Object} thumbUrls
                 * An object indexed by image widths
                 * with URLs to appropriately sized thumbnails
                 */
@@ -122,7 +122,7 @@
         * Constructs a new Image object out of an object containing
         * imageinfo data from an API response.
         * @param {mw.Title} title
-        * @param {object} imageInfo
+        * @param {Object} imageInfo
         * @returns {mw.mmv.model.Image}
         */
        Image.newFromImageInfo = function ( title, imageInfo ) {
@@ -250,7 +250,7 @@
         * @method
         * @static
         * Creates a new object from repoInfo we found in an API response.
-        * @param {object} repoInfo
+        * @param {Object} repoInfo
         * @returns {mw.mmv.model.Repo}
         */
        Repo.newFromRepoInfo = function ( repoInfo ) {
@@ -278,7 +278,7 @@
        /**
         * @class mw.mmv.model.ForeignApiRepo
         * Represents information about a foreign API repository
-        * @extends Repo
+        * @extends mw.mmv.model.Repo
         * @constructor
         * @inheritdoc
         * @param {string} apiUrl URL to the wiki's api.php
@@ -313,7 +313,7 @@
        /**
         * @class mw.mmv.model.ForeignDbRepo
         * Represents information about a foreign, shared DB repository
-        * @extends Repo
+        * @extends mw.mmv.model.Repo
         * @constructor
         * @inheritdoc
         */
diff --git 
a/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js 
b/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
index ffc2bda..738c859 100644
--- a/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
+++ b/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
@@ -18,6 +18,11 @@
 ( function ( mw, $, oo, MLBInterface ) {
        var LIP;
 
+       /**
+        * @class mw.LightboxInterface
+        * @extends mlb.LightboxInterface
+        * @constructor
+        */
        function LightboxInterface() {
                MLBInterface.call( this );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/106848
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id64da283c4bbeaae930103233f9e798b5a9db51b
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to