File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -462,7 +462,12 @@ class Dartdoc {
462
462
}
463
463
464
464
/// Runs [generateDocs] function and properly handles the errors.
465
- void executeGuarded () {
465
+ ///
466
+ /// Passing in a [postProcessCallback] to do additional processing after
467
+ /// the documentation is generated.
468
+ void executeGuarded ([
469
+ Future <void > Function (DartdocOptionContext ) postProcessCallback,
470
+ ]) {
466
471
onCheckProgress.listen (logProgress);
467
472
// This function should *never* await `runZonedGuarded` because the errors
468
473
// thrown in generateDocs are uncaught. We want this because uncaught errors
@@ -473,7 +478,10 @@ class Dartdoc {
473
478
// never await `runZonedGuarded` and never change the return value of
474
479
// [executeGuarded].
475
480
runZonedGuarded (
476
- generateDocs,
481
+ () async {
482
+ await generateDocs ();
483
+ await postProcessCallback? .call (config);
484
+ },
477
485
(e, chain) {
478
486
if (e is DartdocFailure ) {
479
487
stderr.writeln ('\n dartdoc failed: ${e }.' );
You can’t perform that action at this time.
0 commit comments