| Index: utils/apidoc/apidoc.dart
|
| diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
|
| index 3457d3250d93cf8d64fa76665f22d637b71b9af9..8fff77ada207455663283f3729b1d9f8b648895c 100644
|
| --- a/utils/apidoc/apidoc.dart
|
| +++ b/utils/apidoc/apidoc.dart
|
| @@ -3,7 +3,14 @@
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| /**
|
| - * Generates the complete set of corelib reference documentation.
|
| + * This generates the reference documentation for the core libraries that come
|
| + * with dart. 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 standard library.
|
| + *
|
| + * Usage:
|
| + *
|
| + * $ dart apidoc.dart [--out=<output directory>]
|
| */
|
| #library('apidoc');
|
|
|
| @@ -37,8 +44,16 @@ void main() {
|
| }
|
| }
|
|
|
| + final frogPath = joinPaths(doc.scriptDir, '../../frog/');
|
| +
|
| doc.cleanOutputDirectory(outputDir);
|
|
|
| + // Compile the client-side code to JS.
|
| + // TODO(bob): Right path.
|
| + doc.compileScript(frogPath,
|
| + '${doc.scriptDir}/../../lib/dartdoc/client-live-nav.dart',
|
| + '${outputDir}/client-live-nav.js');
|
| +
|
| // TODO(rnystrom): Use platform-specific path separator.
|
| // The basic dartdoc-provided static content.
|
| doc.copyFiles('${doc.scriptDir}/../../lib/dartdoc/static', outputDir);
|
| @@ -47,7 +62,7 @@ void main() {
|
| doc.copyFiles('${doc.scriptDir}/static', outputDir);
|
|
|
| var files = new VMFileSystem();
|
| - parseOptions('../../frog', ['', '', '--libdir=../../frog/lib'], files);
|
| + parseOptions(frogPath, ['', '', '--libdir=$frogPath/lib'], files);
|
| initializeWorld(files);
|
|
|
| print('Parsing MDN data...');
|
| @@ -59,14 +74,21 @@ void main() {
|
| _diff.run();
|
| world.reset();
|
|
|
| - // TODO(rnystrom): Cram in the the IO libraries. This is hackish right now.
|
| - // We should probably move corelib stuff completely out of dartdoc and have it
|
| - // all here.
|
| + // Add all of the core libraries.
|
| + world.getOrAddLibrary('dart:core');
|
| + world.getOrAddLibrary('dart:coreimpl');
|
| + world.getOrAddLibrary('dart:json');
|
| + world.getOrAddLibrary('dart:dom');
|
| + world.getOrAddLibrary('dart:html');
|
| world.getOrAddLibrary('dart:io');
|
| + world.getOrAddLibrary('dart:isolate');
|
| + world.getOrAddLibrary('dart:uri');
|
| + world.getOrAddLibrary('dart:utf');
|
| + world.process();
|
|
|
| print('Generating docs...');
|
| final apidoc = new Apidoc(mdn, outputDir);
|
| - apidoc.document('html');
|
| + apidoc.document();
|
| }
|
|
|
| class Apidoc extends doc.Dartdoc {
|
|
|