-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgenerate-docs.sh
More file actions
executable file
·47 lines (39 loc) · 967 Bytes
/
generate-docs.sh
File metadata and controls
executable file
·47 lines (39 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
cd $(dirname $0)
td=$(pwd)
out="$1"
if [ -z "$out" ]; then
out=$td/build/apidocs
fi
echo "Writing docs to $out"
SRC_DIR=client/lib/components
SRC_FILES="
$SRC_DIR/nanomaps.util.js
$SRC_DIR/nanomaps.dom.js
$SRC_DIR/nanomaps.geometry.js
$SRC_DIR/nanomaps.projections.js
$SRC_DIR/nanomaps.core.js
$SRC_DIR/nanomaps.tiles.js
$SRC_DIR/nanomaps.motion.js
$SRC_DIR/nanomaps.imgmarker.js
$SRC_DIR/nanomaps.svgmarker.js
"
if [ -z "$JSDOC_DIR" ]; then
JSDOC_DIR=$td/jsdoc-toolkit
fi
if ! [ -f "$JSDOC_DIR/jsrun.jar" ]; then
echo "JSDoc Toolkit not found in $JSDOC_DIR. Please install it."
echo "It can be downloaded from: http://code.google.com/p/jsdoc-toolkit/"
exit 1
fi
jsdoc() {
if ! ( java -Djsdoc.dir=$JSDOC_DIR -jar $JSDOC_DIR/jsrun.jar $JSDOC_DIR/app/run.js "$@" ); then
return 1
fi
}
mkdir -p $out
if ! ( jsdoc -d=$out -e=UTF-8 -t=$JSDOC_DIR/templates/jsdoc $SRC_FILES )
then
echo "Error generating documentation."
exit 1
fi