jenkins-bot has submitted this change and it was merged.

Change subject: Rename JSDuck config to standard 'jsduck'
......................................................................


Rename JSDuck config to standard 'jsduck'

* Move configuration to /jsduck.json per standard.

* Move --processes=0 from maintenace script into config file.

* Use grunt-contrib-copy instead of a symlink for resources.

Change-Id: Iaaaac50ee78dd9ff8f24f1ef3a3685ad51cf33b2
(cherry picked from commit 3bbd27aa4911e491a6e0838438e9bc03c9df22c6)
---
M Gruntfile.js
A jsduck.json
D maintenance/jsduck/config.json
M maintenance/mwjsduck-gen
M package.json
5 files changed, 57 insertions(+), 64 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index 1330cd3..375c3a2 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,5 +1,6 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
+       grunt.loadNpmTasks( 'grunt-contrib-copy' );
        grunt.loadNpmTasks( 'grunt-contrib-jshint' );
        grunt.loadNpmTasks( 'grunt-contrib-watch' );
        grunt.loadNpmTasks( 'grunt-banana-checker' );
@@ -54,6 +55,16 @@
                                '.jshintrc'
                        ],
                        tasks: 'test'
+               },
+               copy: {
+                       jsduck: {
+                               src: 'resources/**/*',
+                               dest: 'docs/js/modules',
+                               expand: true,
+                               rename: function ( dest, src ) {
+                                       return require( 'path' ).join( dest, 
src.replace( 'resources/', '' ) );
+                               }
+                       }
                }
        } );
 
diff --git a/jsduck.json b/jsduck.json
new file mode 100644
index 0000000..ef92fa1
--- /dev/null
+++ b/jsduck.json
@@ -0,0 +1,40 @@
+{
+       "--title": "MediaWiki core - Documentation",
+       "--categories": "maintenance/jsduck/categories.json",
+       "--eg-iframe": "maintenance/jsduck/eg-iframe.html",
+       "--tags": "maintenance/jsduck/CustomTags.rb",
+       "--warnings": ["-nodoc(class,public)"],
+       "--builtin-classes": true,
+       "--processes": "0",
+       "--warnings-exit-nonzero": true,
+       "--external": "HTMLElement,HTMLDocument,Window,File",
+       "--output": "docs/js",
+       "--": [
+               "maintenance/jsduck/external.js",
+               "resources/src/mediawiki",
+               "resources/src/mediawiki.action",
+               "resources/src/mediawiki.api",
+               "resources/src/mediawiki.language",
+               "resources/src/mediawiki.page",
+               "resources/src/mediawiki.special",
+               "resources/src/jquery/jquery.accessKeyLabel.js",
+               "resources/src/jquery/jquery.arrowSteps.js",
+               "resources/src/jquery/jquery.autoEllipsis.js",
+               "resources/src/jquery/jquery.badge.js",
+               "resources/src/jquery/jquery.byteLength.js",
+               "resources/src/jquery/jquery.byteLimit.js",
+               "resources/src/jquery/jquery.checkboxShiftClick.js",
+               "resources/src/jquery/jquery.client.js",
+               "resources/src/jquery/jquery.colorUtil.js",
+               "resources/src/jquery/jquery.confirmable.js",
+               "resources/src/jquery/jquery.footHovzer.js",
+               "resources/src/jquery/jquery.getAttrs.js",
+               "resources/src/jquery/jquery.hidpi.js",
+               "resources/src/jquery/jquery.localize.js",
+               "resources/src/jquery/jquery.makeCollapsible.js",
+               "resources/src/jquery/jquery.spinner.js",
+               "resources/src/jquery/jquery.tabIndex.js",
+               "resources/lib/oojs",
+               "resources/lib/oojs-ui"
+       ]
+}
diff --git a/maintenance/jsduck/config.json b/maintenance/jsduck/config.json
deleted file mode 100644
index e97f292..0000000
--- a/maintenance/jsduck/config.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
-       "--title": "MediaWiki core - Documentation",
-       "--categories": "./categories.json",
-       "--eg-iframe": "./eg-iframe.html",
-       "--tags": "./CustomTags.rb",
-       "--warnings": ["-nodoc(class,public)"],
-       "--builtin-classes": true,
-       "--warnings-exit-nonzero": true,
-       "--external": "HTMLElement,HTMLDocument,Window,File",
-       "--footer": "Documentation for MediaWiki core. Generated on {DATE} by 
{JSDUCK} {VERSION}.",
-       "--output": "../../docs/js",
-       "--": [
-               "./external.js",
-               "../../resources/src/mediawiki",
-               "../../resources/src/mediawiki.action",
-               "../../resources/src/mediawiki.api",
-               "../../resources/src/mediawiki.language",
-               "../../resources/src/mediawiki.page",
-               "../../resources/src/mediawiki.special",
-               "../../resources/src/jquery/jquery.accessKeyLabel.js",
-               "../../resources/src/jquery/jquery.arrowSteps.js",
-               "../../resources/src/jquery/jquery.autoEllipsis.js",
-               "../../resources/src/jquery/jquery.badge.js",
-               "../../resources/src/jquery/jquery.byteLength.js",
-               "../../resources/src/jquery/jquery.byteLimit.js",
-               "../../resources/src/jquery/jquery.checkboxShiftClick.js",
-               "../../resources/src/jquery/jquery.client.js",
-               "../../resources/src/jquery/jquery.colorUtil.js",
-               "../../resources/src/jquery/jquery.confirmable.js",
-               "../../resources/src/jquery/jquery.footHovzer.js",
-               "../../resources/src/jquery/jquery.getAttrs.js",
-               "../../resources/src/jquery/jquery.hidpi.js",
-               "../../resources/src/jquery/jquery.localize.js",
-               "../../resources/src/jquery/jquery.makeCollapsible.js",
-               "../../resources/src/jquery/jquery.spinner.js",
-               "../../resources/src/jquery/jquery.tabIndex.js",
-               "../../resources/lib/oojs",
-               "../../resources/lib/oojs-ui"
-       ]
-}
diff --git a/maintenance/mwjsduck-gen b/maintenance/mwjsduck-gen
index 5247637..6b7c77b 100755
--- a/maintenance/mwjsduck-gen
+++ b/maintenance/mwjsduck-gen
@@ -1,25 +1,4 @@
 #!/usr/bin/env bash
 set -e
-
-JSDUCK_MWVERSION=master
-if [[ "$1" == "--version" && "$2" != "" ]]
-then
-       JSDUCK_MWVERSION="$2"
-elif [[ "$*" != "" ]]
-then
-       FILENAME=$(basename $0)
-       echo "Usage: $FILENAME [--version <mediawiki version>]"
-       echo
-       exit 1
-fi
-
-MWCORE_DIR=$(cd $(dirname $0)/..; pwd)
-
-jsduck \
---config=$MWCORE_DIR/maintenance/jsduck/config.json \
---footer="Documentation for branch ($JSDUCK_MWVERSION) on {DATE} by {JSDUCK} 
{VERSION}." \
---processes 0
-
-echo 'JSDuck execution finished.'
-
-ln -s ../../resources $MWCORE_DIR/docs/js/modules
+cd $(dirname $0)/..
+jsduck
diff --git a/package.json b/package.json
index 7913363..a20da53 100644
--- a/package.json
+++ b/package.json
@@ -2,11 +2,14 @@
   "name": "mediawiki",
   "version": "0.0.0",
   "scripts": {
-    "test": "grunt test"
+    "test": "grunt test",
+    "doc": "jsduck",
+    "postdoc": "grunt copy:jsduck"
   },
   "devDependencies": {
     "grunt": "0.4.2",
     "grunt-contrib-jshint": "0.10.0",
+    "grunt-contrib-copy": "0.8.0",
     "grunt-contrib-watch": "0.6.1",
     "grunt-banana-checker": "0.2.0",
     "grunt-jscs": "0.6.1",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaaaac50ee78dd9ff8f24f1ef3a3685ad51cf33b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_24
Gerrit-Owner: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to