Skip to content

Commit 70f7d85

Browse files
committed
API Docs for develop and master versions
1 parent 1f6c678 commit 70f7d85

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

api-docs-gen/README.md renamed to api-docs-gen/README-src.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Navigating through the API docs
22

3-
These docs correspond to NPM released main line versions.
4-
Please see [dev docs](../develop/) for development versions.
5-
63
The API docs cover three libraries:
74

85
- @stomp/stompjs

api-docs-gen/config.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
BASE=`dirname $0`/consolidated
2-
BUNDLES="stompjs rx-stomp ng2-stompjs"
1+
export BASE=`dirname $0`/consolidated
2+
export BUNDLES="stompjs rx-stomp ng2-stompjs"
33

4-
DESTINATION=../api-docs/latest/
4+
if [[ "$BRANCH" == "develop" ]]
5+
then
6+
export DESTINATION=../api-docs/develop/
7+
export THEME=postmark
8+
export MESSAGE="These docs correspond to development versions. Please see [api-docs](../latest/) for NPM released versions."
9+
else
10+
export DESTINATION=../api-docs/latest/
11+
export THEME=vagrant
12+
export MESSAGE="These docs correspond to NPM released main line versions. Please see [dev docs](../develop/) for development versions."
13+
fi

api-docs-gen/doc-gen.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#!/usr/bin/env bash
22

3+
# usually will receive from calling script, assume develop otherwise
4+
export BRANCH=${BRANCH:-$1}
5+
export BRANCH=${BRANCH:-develop}
6+
37
source `dirname $0`/config.sh
48

59
rm -rf $DESTINATION
610

711
cd $BASE/..
812

13+
sed -e "3i$MESSAGE\n" README-src.md > README.md
14+
915
./node_modules/.bin/compodoc \
1016
-p tsconfig.json \
1117
-d $DESTINATION \
1218
--disablePrivate --disableProtected --disableInternal --disableGraph \
13-
--theme vagrant --hideGenerator \
19+
--theme $THEME --hideGenerator \
1420
"$@"

api-docs-gen/docs-refresh.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
# by default assume master branch
4+
export BRANCH=${1:-master}
5+
36
source `dirname $0`/config.sh
47

58
rm -rf $BASE
@@ -9,9 +12,9 @@ cd $BASE
912

1013
for bundle in $BUNDLES
1114
do
12-
wget -O $bundle.zip https://github.com/stomp-js/$bundle/archive/master.zip
15+
wget -O $bundle.zip https://github.com/stomp-js/$bundle/archive/$BRANCH.zip
1316
unzip -o $bundle
14-
mv $bundle-master $bundle
17+
mv $bundle-$BRANCH $bundle
1518
done
1619

1720
cd -

api-docs-gen/local-refresh.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
# Generatinf locally, by default assume devlop
4+
export BRANCH=${1:-develop}
5+
36
source `dirname $0`/config.sh
47

58
mkdir -p $BASE

0 commit comments

Comments
 (0)