From 9af6f34b5591ad2553d4e05a7942f6a5c2982fbb Mon Sep 17 00:00:00 2001 From: Juanfran Date: Tue, 6 Feb 2024 11:49:10 +0100 Subject: [PATCH] feat: listen changes --- plugins-runtime/src/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins-runtime/src/index.ts b/plugins-runtime/src/index.ts index ba481c8..332de3d 100644 --- a/plugins-runtime/src/index.ts +++ b/plugins-runtime/src/index.ts @@ -1,5 +1,13 @@ -// eslint-disable-next-line @typescript-eslint/no-explicit-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export function initialize(api: any) { console.log('plugin context'); console.log(api); + + api.addListener('plugin-page', 'page', (page: any) => { + console.log('Page Changed:', page); + }); + + api.addListener('plugin file', 'file', (file: any) => { + console.log('File Changed:', file); + }); }