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

Unified Diff: utils/apidoc/apidoc

Issue 8973004: Move Nathan's HTML scripts over and rename to apidoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « utils/apidoc/README.txt ('k') | utils/apidoc/apidoc.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/apidoc
diff --git a/utils/apidoc/apidoc b/utils/apidoc/apidoc
new file mode 100755
index 0000000000000000000000000000000000000000..cf877f50f21dbae2489a31720f6568b989250535
--- /dev/null
+++ b/utils/apidoc/apidoc
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# This generates the reference documentation for the core libraries that come
+# with dartdoc. It is built on top of dartdoc, which is a general-purpose
+# library for generating docs from any Dart code. This library extends that to
+# include additional information and styling specific to our corelib.
+#
+# Usage:
+#
+# $ ./apidoc
+#
+# Pretty simple. :)
+
+# TODO(rnystrom): This script is more or less a copy of the one in dartdoc but
+# tweaked to output stuff to here instead of inside dartdoc/docs. That's pretty
+# gross. Ideally, we'd write the whole thing in Dart an ditch the shell
+# but right now we can't even copy binary files using Dart.
+
+# Run from dartdoc directory to get correct relative paths.
+pushd `dirname "$0"` >>/dev/null
+
+# Generate the client-side .js file from interact.dart if we haven't already or
+# if it's out of date.
+if [ "interact.dart" -nt "static/interact.js" ]
+ then
+ ../../frog/minfrog --libdir=../../frog/lib \
+ --out=../dartdoc/static/interact.js --compile-only interact.dart
+ echo "Compiled interact.dart."
+fi
+
+# Clean the output directory.
+if [ -d "docs" ]; then
+ rm -r docs
+fi
+mkdir docs
+
+# Copy the static files over.
+cp ../dartdoc/static/* docs
+
+# Ditch the first arg so we can pass any extra arguments to dartdoc.
+shift
+
+# Generate the user's docs.
+../../frog/minfrog --libdir=../../frog/lib ../apidoc/apidoc.dart
+
+popd >>/dev/null
« no previous file with comments | « utils/apidoc/README.txt ('k') | utils/apidoc/apidoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698