Skip to content

Commit dfbb61e

Browse files
committed
update installation instructions
1 parent 53762f6 commit dfbb61e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

resources/views/docs/desktop/2/getting-started/installation.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ NativePHP is built to work best with Laravel. You can install it into an existin
2828
## Install a NativePHP runtime
2929

3030
```shell
31-
composer require nativephp/electron
31+
composer require nativephp/desktop
3232
```
3333

3434
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`.
4747

4848
It adds the `composer native:dev` script to your `composer.json`, which you are free to modify to suit your needs.
4949

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.
5253

5354
**Whenever you set up NativePHP on a new machine or in CI, you should run the installer to make sure all the
5455
necessary dependencies are in place to build your application.**
5556

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+
5663
## Start the development server
5764

5865
**Heads up!** Before starting your app in a native context, try running it in the browser. You may bump into exceptions

0 commit comments

Comments
 (0)