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:
parent
7a79ef62bd
commit
9af6f34b55
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue