| Index: utils/apidoc/apidoc.dart
|
| diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
|
| index 981980817901435207c9fc1927946e71de0eaaf3..e73daa9fcd98b390b0827e336b45be8e2942b573 100644
|
| --- a/utils/apidoc/apidoc.dart
|
| +++ b/utils/apidoc/apidoc.dart
|
| @@ -109,21 +109,32 @@ void main() {
|
| apidocLibraries.add(new Path('dart:$name'));
|
| }
|
| });
|
| - apidocLibraries.add(doc.scriptDir.append('../../pkg/unittest/unittest.dart'));
|
| - apidocLibraries.add(doc.scriptDir.append('../../pkg/intl/intl.dart'));
|
| -
|
| - print('Generating docs...');
|
| - final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache);
|
| - // Select the libraries to include in the produced documentation:
|
| - apidoc.includeApi = true;
|
| - apidoc.includedLibraries = <String>[
|
| - 'unittest',
|
| - 'intl',
|
| - ];
|
| -
|
| - Futures.wait([compiled, copiedStatic, copiedApiDocStatic]).then((_) {
|
| - apidoc.documentLibraries(apidocLibraries, doc.libPath);
|
| - });
|
| +
|
| + final includedLibraries = <String>[];
|
| + var lister = new Directory.fromPath(
|
| + doc.scriptDir.append('../../pkg/')).list();
|
| + lister.onDir = (dirPath) {
|
| + var path = new Path(dirPath);
|
| + var libname = path.filename;
|
| + path = path.append('${libname}.dart');
|
| + if (new File.fromPath(path).existsSync()) {
|
| + apidocLibraries.add(path);
|
| + includedLibraries.add(libname);
|
| + } else {
|
| + print('Warning: could not find package at $path');
|
| + }
|
| + };
|
| + lister.onDone = (success) {
|
| + print('Generating docs...');
|
| + final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache);
|
| + // Select the libraries to include in the produced documentation:
|
| + apidoc.includeApi = true;
|
| + apidoc.includedLibraries = includedLibraries;
|
| +
|
| + Futures.wait([compiled, copiedStatic, copiedApiDocStatic]).then((_) {
|
| + apidoc.documentLibraries(apidocLibraries, doc.libPath);
|
| + });
|
| + };
|
| }
|
|
|
| /**
|
|
|