main.js 552 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. module.exports = {
  3. load () {
  4. // execute when package loaded
  5. },
  6. unload () {
  7. // execute when package unloaded
  8. },
  9. // register your ipc messages here
  10. messages: {
  11. 'open' () {
  12. // open entry panel registered in package.json
  13. Editor.Panel.open('compressImages');
  14. },
  15. 'say-hello' () {
  16. Editor.log('Hello World!');
  17. // send ipc message to panel
  18. Editor.Ipc.sendToPanel('compressImages', 'compressImages:hello');
  19. },
  20. 'clicked' () {
  21. Editor.log('Button clicked!');
  22. }
  23. },
  24. };