main.js Project entry file and lifecycle

    1. # Introducing framework core ee-core
    2. const Appliaction = require('ee-core').Appliaction;
    3. # main class
    4. class Main extends Appliaction {
    5. constructor() {
    6. super();
    7. // this object is equal to the global app object of EE framework
    8. }
    9. /**
    10. * core app have been loaded
    11. */
    12. async ready () {
    13. // do some things
    14. }
    15. /**
    16. * electron app ready
    17. */
    18. async electronAppReady () {
    19. // do some things
    20. }
    21. /**
    22. * main window have been loaded
    23. */
    24. async windowReady () {
    25. // do some things
    26. }
    27. /**
    28. * before app close
    29. */
    30. async beforeClose () {
    31. // do some things
    32. }
    33. }
    34. // instantiation
    35. new Main();