Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bb3a696

Browse files
feat: add watchAction hooks (#5661)
1 parent cf4d667 commit bb3a696

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎lib/controllers/run-controller.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,15 @@ export class RunController extends EventEmitter implements IRunController {
759759
// IMPORTANT: keep the same instance as we rely on side effects
760760
_.assign(liveSyncResultInfo, fullLiveSyncResultInfo);
761761
};
762+
await this.$hooksService.executeBeforeHooks("watchAction", {
763+
hookArgs: {
764+
liveSyncResultInfo,
765+
filesToSync,
766+
allAppFiles,
767+
isInHMRMode,
768+
filesChangedEvent: data,
769+
},
770+
});
762771

763772
await this.refreshApplication(
764773
projectData,
@@ -786,6 +795,13 @@ export class RunController extends EventEmitter implements IRunController {
786795
);
787796
}
788797
}
798+
await this.$hooksService.executeAfterHooks("watchAction", {
799+
liveSyncResultInfo,
800+
filesToSync,
801+
allAppFiles,
802+
filesChangedEvent: data,
803+
isInHMRMode,
804+
});
789805

790806
this.$logger.info(
791807
util.format(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /