| Index: sdk/lib/_internal/dartdoc/bin/dartdoc.dart
|
| diff --git a/sdk/lib/_internal/dartdoc/bin/dartdoc.dart b/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
|
| old mode 100755
|
| new mode 100644
|
| index ae69d0f6d9c084a99167de06e2b428cf8f4c6635..d38ea73574f187fc3b61d9d981b4db6c8d914909
|
| --- a/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
|
| +++ b/sdk/lib/_internal/dartdoc/bin/dartdoc.dart
|
| @@ -232,23 +232,28 @@ main() {
|
|
|
| cleanOutputDirectory(dartdoc.outputDir);
|
|
|
| - dartdoc.documentLibraries(entrypoints, libPath, pkgPath);
|
| -
|
| - Future compiled = compileScript(dartdoc.mode, dartdoc.outputDir, libPath);
|
| - Future filesCopied = copyDirectory(scriptDir.append('../static'),
|
| - dartdoc.outputDir);
|
| -
|
| - Future.wait([compiled, filesCopied]).then((futureStatus) {
|
| + print('Analyzing sources');
|
| + Future documented = dartdoc.documentLibraries(entrypoints, libPath, pkgPath);
|
| +
|
| + documented.then((_) {
|
| + Future compiled = compileScript(dartdoc.mode, dartdoc.outputDir, libPath);
|
| + Future filesCopied = copyDirectory(scriptDir.append('../static'),
|
| + dartdoc.outputDir);
|
| +
|
| + Future.wait([compiled, filesCopied]).then((_) {
|
| + dartdoc.cleanup();
|
| + if (dartdoc.totalLibraries + dartdoc.totalTypes +
|
| + dartdoc.totalMembers == 0) {
|
| + print('Nothing was documented!');
|
| + exit(1);
|
| + } else {
|
| + print('Documented ${dartdoc.totalLibraries} libraries, '
|
| + '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} '
|
| + 'members.');
|
| + }
|
| + });
|
| + }, onError: (AsyncError asyncError) {
|
| + print('Generation failed: ${asyncError.error}');
|
| dartdoc.cleanup();
|
| -
|
| - if (dartdoc.totalLibraries + dartdoc.totalTypes +
|
| - dartdoc.totalMembers == 0) {
|
| - print('Nothing was documented!');
|
| - exit(1);
|
| - } else {
|
| - print('Documented ${dartdoc.totalLibraries} libraries, '
|
| - '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} '
|
| - 'members.');
|
| - }
|
| });
|
| }
|
|
|