0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-06 14:50:21 -05:00

feat: listen changes

This commit is contained in:
Juanfran 2024-02-06 11:49:10 +01:00
parent 7a79ef62bd
commit 9af6f34b55

View file

@ -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);
});
}