Update JSDuck config to standard jsduck.json

Also
* This way we don't need to pass the --config=jsduck.config.json
  parameter but can run plain 'jsduck' in Jenkins. Allowing it
  to use the standard job template for testing.

* Move processes=0 to jsduck.json.
  Workaround for https://github.com/senchalabs/jsduck/issues/525

* Use standard ' - Documentation' suffix, which makes the first
  part of the title render in bold (similar to how we do in OOjs
  and OOjs UI already).

Change-Id: I6c9c7a1f29df0a72dc8cd0d37a83aaef23068062
This commit is contained in:
Timo Tijhof 2015-03-05 23:51:53 +01:00
parent 432384096e
commit 5813d53271
11 changed files with 30 additions and 33 deletions

View file

@ -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"
]
}

View file

@ -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'
]
},

View file

@ -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

22
jsduck.json Normal file
View file

@ -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"
]
}