summaryrefslogtreecommitdiff
path: root/maintenance/mwjsduck-gen
blob: bc10bc2c7b39fab74f617fc3e9956e54ac728f4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

JSDUCK_MWVERSION=master
if [[ "$1" == "--version" && "$2" != "" ]]
then
	JSDUCK_MWVERSION="$2"
elif [[ "$*" != "" ]]
then
	echo "Usage $0: [--version <mediawiki version>]"
	echo
	exit 1
fi

MWCORE_DIR=$(cd $(dirname $0)/..; pwd)

jsduck \
--config=$MWCORE_DIR/maintenance/jsduck/config.json \
--footer="Documentation for MediaWiki core ($JSDUCK_MWVERSION). Generated on {DATE} by {JSDUCK} {VERSION}." \
&& echo 'JSDuck execution finished.'

ln -s ../../resources $MWCORE_DIR/docs/js/modules