This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(doc-gen): Use new docviewer for generating docs
- Loading branch information
1 parent
99d9f2a
commit 67fcaff
Showing
4 changed files
with
48 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ dartium | |
**/*.dart.js.map | ||
**/*.dart.precompiled.js | ||
docs.angulardart.org | ||
dartdoc-viewer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AngularDart [![Build Status](https://travis-ci.org/angular/angular.dart.png?branch=master)](https://travis-ci.org/angular/angular.dart) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
vicb
Contributor
|
||
AngularDart | ||
============ | ||
|
||
A port of [Angular][ng] to [Dart][dart]. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,47 @@ | ||
#!/bin/bash | ||
. $(dirname $0)/env.sh | ||
|
||
# Use the -d flag to set the directory for the dartdoc viewer build files | ||
while getopts ":d:" opt ; do | ||
|
||
case $opt in | ||
d) | ||
DOCVIEWER_DIR=$OPTARG | ||
DOCDIR_OPTION="--out "$DOCVIEWER_DIR"/web/docs" | ||
echo "Generated docs will be output to: $DOCVIEWER_DIR/web/docs" >&2 | ||
;; | ||
\?) | ||
echo "Invalid option: -$OPTARG" >&2 | ||
exit 1 | ||
;; | ||
:) | ||
echo "Use -d to specify the directory where the dartdoc viewer pubspec.yaml is located." >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# Temporary change to delete the Build Status image markdown from the README (image md not supported by dartdoc-viewer) | ||
cp README.md README-orig.md | ||
cat README-orig.md | sed "1s/^AngularDart.*/AngularDart/" > README.md | ||
|
||
# Temporary during transition period from use of dartdoc to docgen. | ||
if [ -x "$DART_DOCGEN" ]; then | ||
DOC_CMD="$DART_DOCGEN" | ||
MODE_OPTION="--start-page=angular \ | ||
--exclude-lib=js,metadata,meta,mirrors,intl,number_symbols,number_symbol_data,intl_helpers,date_format_internal,date_symbols,angular.util \ | ||
--no-include-sdk" | ||
|
||
elif [ -x "$DARTDOC" ]; then | ||
DOC_CMD="$DARTDOC" | ||
MODE_OPTION="--mode=static" | ||
fi | ||
|
||
echo "Generating documentation using $DOC_CMD $MODE_OPTION $DOCDIR_OPTION" | ||
"$DOC_CMD" $MODE_OPTION $DOCDIR_OPTION \ | ||
--package-root=packages/ \ | ||
lib/angular.dart lib/utils.dart lib/change_detection/watch_group.dart lib/core/module.dart lib/core_dom/module.dart lib/filter/module.dart lib/directive/module.dart lib/mock/module.dart lib/perf/module.dart lib/playback/playback_data.dart lib/playback/playback_http.dart lib/routing/module.dart lib/tools/common.dart lib/tools/expression_extractor.dart lib/tools/io.dart lib/tools/io_impl.dart lib/tools/source_crawler_impl.dart lib/tools/source_metadata_extractor.dart lib/tools/template_cache_annotation.dart lib/tools/template_cache_generator.dart | ||
|
||
if [ -x "$DART_DOCGEN" ]; then | ||
# Set the Version for dartdoc-viewer | ||
head CHANGELOG.md | awk 'NR==2' | sed 's/^# //' > VERSION | ||
mv VERSION $DOCVIEWER_DIR/web/docs | ||
(cd $DOCVIEWER_DIR; pub build) | ||
|
||
# Revert the temp copy of the README.md file | ||
mv README-orig.md README.md | ||
fi | ||
# Dart doc can not be run from the same directory as dartdoc-viewer | ||
# see: https://code.google.com/p/dart/issues/detail?id=17231 | ||
cd lib | ||
|
||
echo "Generating documentation" | ||
"$DART_DOCGEN" $DOC_OPTION $DOCDIR_OPTION \ | ||
--out ../docs \ | ||
--start-page=angular \ | ||
--exclude-lib=js,metadata,meta,mirrors,intl,number_symbols,number_symbol_data,intl_helpers,date_format_internal,date_symbols,angular.util \ | ||
--no-include-sdk \ | ||
--package-root=../packages/ \ | ||
../lib/angular.dart \ | ||
../lib/utils.dart \ | ||
../lib/change_detection/watch_group.dart \ | ||
../lib/core/module.dart \ | ||
../lib/core_dom/module.dart \ | ||
../lib/filter/module.dart \ | ||
../lib/directive/module.dart \ | ||
../lib/mock/module.dart \ | ||
../lib/perf/module.dart \ | ||
../lib/playback/playback_data.dart \ | ||
../lib/playback/playback_http.dart \ | ||
../lib/routing/module.dart \ | ||
../lib/tools/common.dart \ | ||
../lib/tools/expression_extractor.dart \ | ||
../lib/tools/io.dart \ | ||
../lib/tools/io_impl.dart \ | ||
../lib/tools/source_crawler_impl.dart \ | ||
../lib/tools/source_metadata_extractor.dart \ | ||
../lib/tools/template_cache_annotation.dart \ | ||
../lib/tools/template_cache_generator.dart | ||
|
||
cd .. | ||
|
||
DOCVIEWER_DIR="dartdoc-viewer"; | ||
if [ ! -d "$DOCVIEWER_DIR" ]; then | ||
git clone https://github.com/angular/dartdoc-viewer.git -b angular-skin $DOCVIEWER_DIR | ||
fi; | ||
|
||
head CHANGELOG.md | awk 'NR==2' | sed 's/^# //' > docs/VERSION | ||
rm -rf $DOCVIEWER_DIR/client/web/docs/ | ||
mv docs/ $DOCVIEWER_DIR/client/web/docs/ | ||
(cd $DOCVIEWER_DIR/client; pub build) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Was this change intentional?