main.js 741 B

1234567891011121314151617181920212223242526272829303132
  1. 'use strict';
  2. module.exports = {
  3. load () {
  4. // execute when package loaded
  5. // let fs = require('fs');
  6. // let path = require('path');
  7. // fs.mkdirSync(path.join(Editor.Project.path, '文件'));
  8. // Editor.success('文件夹创建成功!');
  9. },
  10. unload () {
  11. // execute when package unloaded
  12. },
  13. // register your ipc messages here
  14. messages: {
  15. 'open' () {
  16. // open entry panel registered in package.json
  17. Editor.Panel.open('test-tools');
  18. },
  19. 'say-hello' () {
  20. Editor.log('Hello World!');
  21. // send ipc message to panel
  22. Editor.Ipc.sendToPanel('test-tools', 'test-tools:hello');
  23. },
  24. 'clicked' () {
  25. Editor.log('Button clicked!');
  26. }
  27. },
  28. };