| 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
|
|
|