File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -462,7 +462,12 @@ class Dartdoc {
462462 }
463463
464464 /// 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+ ]) {
466471 onCheckProgress.listen (logProgress);
467472 // This function should *never* await `runZonedGuarded` because the errors
468473 // thrown in generateDocs are uncaught. We want this because uncaught errors
@@ -473,7 +478,10 @@ class Dartdoc {
473478 // never await `runZonedGuarded` and never change the return value of
474479 // [executeGuarded].
475480 runZonedGuarded (
476- generateDocs,
481+ () async {
482+ await generateDocs ();
483+ await postProcessCallback? .call (config);
484+ },
477485 (e, chain) {
478486 if (e is DartdocFailure ) {
479487 stderr.writeln ('\n dartdoc failed: ${e }.' );
You can’t perform that action at this time.
0 commit comments