/*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' );
more: {
browsers: [ 'Chrome', 'Firefox' ]
}
+ },
+ copy: {
+ jsduck: {
+ src: 'resources/**/*',
+ dest: 'docs/js/modules',
+ expand: true,
+ rename: function ( dest, src ) {
+ return require( 'path' ).join( dest, src.replace( 'resources/', '' ) );
+ }
+ }
}
} );
--- /dev/null
+{
+ "--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,MouseEvent,KeyboardEvent",
+ "--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/mediawiki.toolbar",
+ "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"
+ ]
+}
+++ /dev/null
-{
- "--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,MouseEvent,KeyboardEvent",
- "--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/mediawiki.toolbar",
- "../../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"
- ]
-}
#!/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
"name": "mediawiki",
"version": "0.0.0",
"scripts": {
- "test": "grunt test"
+ "test": "grunt test",
+ "doc": "jsduck",
+ "postdoc": "grunt copy:jsduck"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-banana-checker": "0.2.0",
+ "grunt-contrib-copy": "0.8.0",
"grunt-contrib-jshint": "0.11.0",
"grunt-contrib-watch": "0.6.1",
"grunt-jscs": "1.5.0",