You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: resources/views/docs/desktop/2/getting-started/installation.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ NativePHP is built to work best with Laravel. You can install it into an existin
28
28
## Install a NativePHP runtime
29
29
30
30
```shell
31
-
composer require nativephp/electron
31
+
composer require nativephp/desktop
32
32
```
33
33
34
34
This package contains all the classes, commands, and interfaces that your application will need to work with the
@@ -47,12 +47,19 @@ It also publishes the NativePHP configuration file to `config/nativephp.php`.
47
47
48
48
It adds the `composer native:dev` script to your `composer.json`, which you are free to modify to suit your needs.
49
49
50
-
Finally, it installs any other dependencies needed for the specific runtime you're using, e.g. for Electron it installs
51
-
the NPM dependencies.
50
+
Then it installs the `php artisan native:install` script as a `post-update-cmd` so your environment is always up to date after a `composer update`.
51
+
52
+
Finally, it installs any other dependencies needed to run Electron.
52
53
53
54
**Whenever you set up NativePHP on a new machine or in CI, you should run the installer to make sure all the
54
55
necessary dependencies are in place to build your application.**
55
56
57
+
### Publishing the Electron project
58
+
59
+
If you need to make any specific adjustments to the underlying Electron app, you are free to publish it using `php artisan native:install --publish`. This will export the Electron project to `{project-root}/nativephp/electron` and allow you to fully control all of NativePHP's inner workings.
60
+
61
+
Additionally this will modify your `post-update-cmd` script to keep your project up to date, but mind it's possible you'll need to cherry-pick any adjustments you've made after a `composer update`.
62
+
56
63
## Start the development server
57
64
58
65
**Heads up!** Before starting your app in a native context, try running it in the browser. You may bump into exceptions
0 commit comments