| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * To generate docs for a library, run this script with the path to an | 6 * To generate docs for a library, run this script with the path to an |
| 7 * entrypoint .dart file, like: | 7 * entrypoint .dart file, like: |
| 8 * | 8 * |
| 9 * $ dart dartdoc.dart foo.dart | 9 * $ dart dartdoc.dart foo.dart |
| 10 * | 10 * |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 copyDirectory(scriptDir.append('../static'), dartdoc.outputDir) | 244 copyDirectory(scriptDir.append('../static'), dartdoc.outputDir) |
| 245 ]); | 245 ]); |
| 246 }) | 246 }) |
| 247 .then((_) { | 247 .then((_) { |
| 248 print(dartdoc.status); | 248 print(dartdoc.status); |
| 249 if (dartdoc.totals == 0) { | 249 if (dartdoc.totals == 0) { |
| 250 exit(1); | 250 exit(1); |
| 251 } | 251 } |
| 252 }) | 252 }) |
| 253 .catchError((e) { | 253 .catchError((e) { |
| 254 print('Error: generation failed: ${e.error}'); | 254 print('Error: generation failed: ${e}'); |
| 255 exit(1); | 255 exit(1); |
| 256 }) | 256 }) |
| 257 .whenComplete(() => dartdoc.cleanup()); | 257 .whenComplete(() => dartdoc.cleanup()); |
| 258 } | 258 } |
| OLD | NEW |