Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: third_party/pkg/angular/scripts/generate-documentation.sh

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/scripts/env.sh ('k') | third_party/pkg/angular/scripts/generate-expressions.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/angular/scripts/generate-documentation.sh
diff --git a/third_party/pkg/angular/scripts/generate-documentation.sh b/third_party/pkg/angular/scripts/generate-documentation.sh
index 01c698d1eea990d1e3a3d5641a705422817cf012..ffa59ee7a0dc6c6e855be6f0f20adbd80676f19b 100755
--- a/third_party/pkg/angular/scripts/generate-documentation.sh
+++ b/third_party/pkg/angular/scripts/generate-documentation.sh
@@ -1,20 +1,72 @@
#!/bin/bash
. $(dirname $0)/env.sh
-# Temporary during transition period from use of dartdoc to docgen.
-if [ -x "$DART_DOCGEN" ]; then
- DOC_CMD="$DART_DOCGEN"
- MODE_OPTION=
-elif [ -x "$DARTDOC" ]; then
- DOC_CMD="$DARTDOC"
- MODE_OPTION="--mode=static"
-fi
+# Temporary change to delete the Build Status image markdown from the README (image md not supported by dartdoc-viewer)
+echo '******************************'
+echo '** GENERATING DOCUMENTATION **'
+echo '******************************'
+cp README.md README-orig.md
+cat README-orig.md | sed "1s/^AngularDart.*/AngularDart/" > README.md
+
+# Dart doc can not be run from the same directory as dartdoc-viewer
+# see: https://code.google.com/p/dart/issues/detail?id=17231
-echo "Generating documentation using $DOC_CMD"
-"$DOC_CMD" $MODE_OPTION \
- --package-root=packages/ \
- --out doc \
+( cd packages
+ 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 \
- packages/angular/angular.dart lib/mock/module.dart
+ --no-include-sdk \
+ --package-root=../packages \
+ angular/animate/module.dart \
+ angular/core/annotation.dart \
+ angular/core/module.dart \
+ angular/directive/module.dart \
+ angular/formatter/module.dart \
+ angular/routing/module.dart \
+ angular/mock/module.dart \
+ angular/perf/module.dart \
+ angular/application_factory.dart \
+ angular/application_factory_static.dart \
+ angular/application.dart \
+ angular/introspection.dart \
+ di/di.dart \
+ route_hierarchical/client.dart \
+)
+
+# Revert the temp copy of the README.md file
+rm README.md
+mv README-orig.md README.md
+
+DOCVIEWER_DIR="dartdoc-viewer";
+if [[ $1 == update ]]; then
+ rm -rf $DOCVIEWER_DIR/client/build/web/docs/
+ mv docs $DOCVIEWER_DIR/client/build/web/docs
+ exit;
+fi
+
+echo '--------------------------'
+echo '-- DOCS: dartdoc-viewer --'
+echo '--------------------------'
+if [ ! -d "$DOCVIEWER_DIR" ]; then
+ git clone https://github.com/angular/dartdoc-viewer.git -b angular-skin $DOCVIEWER_DIR
+else
+ (cd $DOCVIEWER_DIR; git pull origin angular-skin)
+fi;
+
+# Create a version file from the current build version
+doc_version=`head CHANGELOG.md | awk 'NR==2' | sed 's/^# //'`
+dartsdk_version=`cat $DARTSDK/version`
+head_sha=`git rev-parse --short HEAD`
+
+echo $doc_version at $head_sha \(with Dart SDK $dartsdk_version\) > docs/VERSION
+
+rm -rf $DOCVIEWER_DIR/client/web/docs/
+mv docs/ $DOCVIEWER_DIR/client/web/docs/
+echo '---------------------'
+echo '-- DOCS: pub build --'
+echo '---------------------'
+(cd $DOCVIEWER_DIR/client; pub build)
« no previous file with comments | « third_party/pkg/angular/scripts/env.sh ('k') | third_party/pkg/angular/scripts/generate-expressions.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698