Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit b33c16b

Browse files
committed
chore: add support for generate-documentation.sh update
1 parent 23a3e35 commit b33c16b

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ dartium
1717
**/*.dart.precompiled.js
1818
docs.angulardart.org
1919
dartdoc-viewer
20+
docs

scripts/generate-documentation.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ cat README-orig.md | sed "1s/^AngularDart.*/AngularDart/" > README.md
77

88
# Dart doc can not be run from the same directory as dartdoc-viewer
99
# see: https://code.google.com/p/dart/issues/detail?id=17231
10-
cd packages
1110

12-
echo "Generating documentation"
13-
"$DART_DOCGEN" $DOC_OPTION $DOCDIR_OPTION \
11+
( cd packages
12+
echo "Generating documentation"
13+
"$DART_DOCGEN" $DOC_OPTION $DOCDIR_OPTION \
1414
--out ../docs \
1515
--start-page=angular \
1616
--exclude-lib=js,metadata,meta,mirrors,intl,number_symbols,number_symbol_data,intl_helpers,date_format_internal,date_symbols,angular.util \
@@ -30,10 +30,19 @@ echo "Generating documentation"
3030
angular/introspection.dart \
3131
di/di.dart \
3232
route_hierarchical/client.dart \
33+
)
3334

34-
cd ..
35+
# Revert the temp copy of the README.md file
36+
rm README.md
37+
mv README-orig.md README.md
3538

3639
DOCVIEWER_DIR="dartdoc-viewer";
40+
if [[ $1 == update ]]; then
41+
rm -rf $DOCVIEWER_DIR/client/build/web/docs/
42+
mv docs $DOCVIEWER_DIR/client/build/web/docs
43+
exit;
44+
fi
45+
3746
if [ ! -d "$DOCVIEWER_DIR" ]; then
3847
git clone https://github.com/angular/dartdoc-viewer.git -b angular-skin $DOCVIEWER_DIR
3948
else
@@ -51,7 +60,4 @@ rm -rf $DOCVIEWER_DIR/client/web/docs/
5160
mv docs/ $DOCVIEWER_DIR/client/web/docs/
5261
(cd $DOCVIEWER_DIR/client; pub build)
5362

54-
# Revert the temp copy of the README.md file
55-
rm README.md
56-
mv README-orig.md README.md
5763

0 commit comments

Comments
 (0)