diff --git a/.docs/config.json b/.docs/config.json deleted file mode 100644 index 81a5751725..0000000000 --- a/.docs/config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "--title": "VisualEditor Code Documentation", - "--categories": "../.docs/categories.json", - "--eg-iframe": "../.docs/eg-iframe.html", - "--tags": "./CustomTags.rb", - "--warnings": ["-nodoc(class,public)"], - "--builtin-classes": true, - "--warnings-exit-nonzero": true, - "--external": "HTMLDocument,Window,Node,Set,Range,Selection,ClientRect,File,Blob,DataTransfer,DataTransferItem", - "--output": "../docs", - "--": [ - "./external.js", - "../lib/ve/.jsduck/external.js", - "../lib/ve/lib/oojs", - "../lib/ve/lib/oojs-ui", - "../lib/ve/lib/unicodejs", - "../lib/ve/src", - "../lib/ve/tests", - "../modules/ve-mw" - ] -} diff --git a/.docs/CustomTags.rb b/.jsduck/CustomTags.rb similarity index 100% rename from .docs/CustomTags.rb rename to .jsduck/CustomTags.rb diff --git a/.docs/categories.json b/.jsduck/categories.json similarity index 100% rename from .docs/categories.json rename to .jsduck/categories.json diff --git a/.docs/eg-iframe.html b/.jsduck/eg-iframe.html similarity index 100% rename from .docs/eg-iframe.html rename to .jsduck/eg-iframe.html diff --git a/.docs/eg-iframe.html.template b/.jsduck/eg-iframe.html.template similarity index 100% rename from .docs/eg-iframe.html.template rename to .jsduck/eg-iframe.html.template diff --git a/.docs/external.js b/.jsduck/external.js similarity index 100% rename from .docs/external.js rename to .jsduck/external.js diff --git a/.docs/generate.sh b/.jsduck/generate.sh similarity index 100% rename from .docs/generate.sh rename to .jsduck/generate.sh diff --git a/.docs/mw-categories.json b/.jsduck/mw-categories.json similarity index 100% rename from .docs/mw-categories.json rename to .jsduck/mw-categories.json diff --git a/Gruntfile.js b/Gruntfile.js index 961829018e..6c369d1b3c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -20,9 +20,9 @@ module.exports = function ( grunt ) { pkg: grunt.file.readJSON( 'package.json' ), jsduckcatconfig: { main: { - target: '.docs/categories.json', + target: '.jsduck/categories.json', from: [ - '.docs/mw-categories.json', + '.jsduck/mw-categories.json', { file: 'lib/ve/.jsduck/categories.json', aggregate: { @@ -42,8 +42,8 @@ module.exports = function ( grunt ) { }, buildloader: { egiframe: { - targetFile: '.docs/eg-iframe.html', - template: '.docs/eg-iframe.html.template', + targetFile: '.jsduck/eg-iframe.html', + template: '.jsduck/eg-iframe.html.template', modules: modules, load: [ 'visualEditor.desktop.standalone' ], pathPrefix: 'lib/ve/', @@ -56,7 +56,7 @@ module.exports = function ( grunt ) { }, all: [ '*.js', - '{.docs,build}/**/*.js', + '{.jsduck,build}/**/*.js', 'modules/**/*.js' ] }, diff --git a/bin/generateDocs.sh b/bin/generateDocs.sh index 5cf94222dd..eeba646b0d 100755 --- a/bin/generateDocs.sh +++ b/bin/generateDocs.sh @@ -1,9 +1,5 @@ #!/usr/bin/env bash set -e - -REPO_DIR=$(cd $(dirname $0)/..; pwd) - -# Disable parallel processing which seems to be causing problems under Ruby 1.8 -jsduck --config $REPO_DIR/.docs/config.json --processes 0 - -ln -s ../lib $REPO_DIR/docs/lib +cd $(dirname $0)/.. +jsduck +ln -s ../lib docs/lib diff --git a/jsduck.json b/jsduck.json new file mode 100644 index 0000000000..494d807f2f --- /dev/null +++ b/jsduck.json @@ -0,0 +1,22 @@ +{ + "--title": "VisualEditor - Documentation", + "--categories": ".jsduck/categories.json", + "--eg-iframe": ".jsduck/eg-iframe.html", + "--tags": ".jsduck/CustomTags.rb", + "--warnings": ["-nodoc(class,public)"], + "--builtin-classes": true, + "--processes": "0", + "--warnings-exit-nonzero": true, + "--external": "HTMLDocument,Window,Node,Set,Range,Selection,ClientRect,File,Blob,DataTransfer,DataTransferItem", + "--output": "docs", + "--": [ + ".jsduck/external.js", + "lib/ve/.jsduck/external.js", + "lib/ve/lib/oojs", + "lib/ve/lib/oojs-ui", + "lib/ve/lib/unicodejs", + "lib/ve/src", + "lib/ve/tests", + "modules/ve-mw" + ] +}