@@ -78,6 +78,8 @@ export interface ApplicationEvents {
7878 bootstrapEnd : [ Application ] ;
7979 reviveProject : [ ProjectReflection ] ;
8080 validateProject : [ ProjectReflection ] ;
81+ generateOutputsBegin : [ ProjectReflection ] ;
82+ generateOutputsEnd : [ ProjectReflection ] ;
8183}
8284
8385/**
@@ -178,21 +180,40 @@ export class Application extends AbstractComponent<
178180 /**
179181 * Emitted after plugins have been loaded and options have been read, but before they have been frozen.
180182 * The listener will be given an instance of {@link Application}.
183+ * @event
181184 */
182185 static readonly EVENT_BOOTSTRAP_END = ApplicationEvents . BOOTSTRAP_END ;
183186
184187 /**
185188 * Emitted after a project has been deserialized from JSON.
186189 * The listener will be given an instance of {@link ProjectReflection}.
190+ * @event
187191 */
188192 static readonly EVENT_PROJECT_REVIVE = ApplicationEvents . REVIVE ;
189193
190194 /**
191195 * Emitted when validation is being run.
192196 * The listener will be given an instance of {@link ProjectReflection}.
197+ * @event
193198 */
194199 static readonly EVENT_VALIDATE_PROJECT = ApplicationEvents . VALIDATE_PROJECT ;
195200
201+ /**
202+ * Emitted just before outputs are generated. This can be used by plugins which generate
203+ * additional auxiliary output files to avoid generating output if the user has validation
204+ * warnings and treat warnings as errors is enabled.
205+ * @event
206+ */
207+ static readonly EVENT_GENERATE_OUTPUTS_BEGIN = ApplicationEvents . GENERATE_OUTPUTS_BEGIN ;
208+
209+ /**
210+ * Emitted just after outputs are generated. This can be used by plugins which generate
211+ * additional auxiliary output files to avoid generating output if the user has validation
212+ * warnings and treat warnings as errors is enabled.
213+ * @event
214+ */
215+ static readonly EVENT_GENERATE_OUTPUTS_END = ApplicationEvents . GENERATE_OUTPUTS_END ;
216+
196217 /**
197218 * Create a new TypeDoc application instance.
198219 */
@@ -712,7 +733,9 @@ export class Application extends AbstractComponent<
712733 * Render outputs selected with options for the specified project
713734 */
714735 public async generateOutputs ( project : ProjectReflection ) : Promise < void > {
736+ this . trigger ( Application . EVENT_GENERATE_OUTPUTS_BEGIN , project ) ;
715737 await this . outputs . writeOutputs ( project ) ;
738+ this . trigger ( Application . EVENT_GENERATE_OUTPUTS_END , project ) ;
716739 }
717740
718741 /**
0 commit comments