Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Conversation

mitchdav
Copy link
Contributor

This PR is largely a quality of life improvement, with the goal to make it easier for developers to interpret what is happening when a NativePHP application boots.

The real functionality of the package, which is the bootstrapping logic, has gone from over 100 lines down to just this:

  private async bootstrapApp(app: Electron.CrossProcessExports.App) {
    await app.whenReady();

    const config = await this.loadConfig();

    this.setDockIcon();
    this.setAppUserModelId(config);
    this.setDeepLinkHandler(config);
    this.startAutoUpdater(config);

    await this.startElectronApi();

    state.phpIni = await this.loadPhpIni();

    await this.startPhpApp();
    await this.startQueueWorker();
    await this.startWebsockets();
    this.startScheduler();

    await notifyLaravel("booted");
  }

I have split the changes up into separate and relatively isolated commits, to try and make it easier to follow.

I have bumped the menubar dependency, and added missing eslint dependencies that were preventing it from running.

I have removed the yarn.lock file, since it's unclear whether the package is using yarn or NPM.

If there are any changes you would like made before this could be approved, please let me know as I'm actively keen to contribute to NativePHP, and have a lot more ideas that will stem off of this PR.

mitchdav added a commit to laramates/forks-nativephp-electron-plugin that referenced this pull request Jun 28, 2024
@simonhamp
Copy link
Member

Thanks for this @mitchdav 🎉

@simonhamp simonhamp merged commit 4d105bd into NativePHP:main Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants