Skip to content

Commit 02a2509

Browse files
Updates browser docs (#217)
* Updates browser docs * Improve code styling and update mobile docs Enhanced code block styling in app.css for better readability, including dark mode improvements. Updated mobile documentation to clarify hot reloading usage and implementation, and added GD PHP extension requirements for app icon and splash screen generation.
1 parent f1f2941 commit 02a2509

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

resources/css/app.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,16 @@ nav.docs-navigation > ul > li > ul {
194194
}
195195

196196
.prose pre code {
197-
@apply text-gray-50;
197+
@apply bg-transparent p-0 text-sm font-normal text-gray-50;
198198
}
199199

200200
.prose code {
201-
@apply px-1;
201+
@apply rounded bg-gray-200 px-1.5 py-0.5 text-sm font-medium text-purple-600;
202+
}
203+
204+
.prose code::before,
205+
.prose code::after {
206+
content: none;
202207
}
203208

204209
.prose a {
@@ -263,5 +268,5 @@ nav.docs-navigation > ul > li > ul {
263268
}
264269

265270
.dark .prose code {
266-
@apply text-gray-300;
271+
@apply bg-gray-800 text-purple-300;
267272
}

resources/views/docs/mobile/1/getting-started/development.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,28 +91,25 @@ If you're familiar with these tools, you can easily open the projects using the
9191
php artisan native:open
9292
```
9393

94-
## Hot Reloading (Experimental)
94+
## Hot Reloading
9595

9696
We've tried to make compiling your apps as fast as possible, but when coming from the 'make a change; hit refresh'-world
9797
of PHP development that we all love, compiling apps can feel like a slow and time-consuming process.
9898

99-
So we've released an early version of hot reloading, which aims to make your development experience feel just like home.
99+
So we've released hot reloading, which aims to make your development experience feel just like home.
100100

101-
You can enable hot reloading by adding the `--watch` flag when running the `native:run` command:
101+
You can enable hot reloading by running the following command:
102102

103103
```shell
104-
php artisan native:run --watch
104+
php artisan native:watch {platform:ios|android}
105105
```
106106

107107
This is useful during development for quickly testing changes without re-compiling your entire app. When you make
108108
changes to any files in your Laravel app, the web view will be reloaded and your changes should show almost immediately.
109109

110-
### Caveats
110+
### Implementation
111111

112-
For now, hot reloading only works in emulators, not on real devices.
113-
114-
Also, it's currently best suited for **Blade** and **Livewire** applications. It doesn't work so well if you're
115-
also trying to hot reload compiled frontends using something like Vite's hot reloading.
112+
The proper way to implement this is to first `run` your app on your device/emulator, then start HMR with `npm run dev` then in a separate terminal run the `native:watch` command. This will reload any Blade/Livewire files as well as any recompiled assets (css/js etc).
116113

117114
## Releasing
118115

resources/views/docs/mobile/1/the-basics/app-icon.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Place a single high-resolution icon file at: `public/icon.png`.
1313
- Format: PNG
1414
- Size: 1024 × 1024 pixels
1515
- Background: Transparent or solid — your choice
16+
- GD PHP extension must be enabled, ensure it has enough memory (~2GB should be enough)
1617

1718
This image will be automatically resized for all Android densities and used as the base iOS app icon.
1819
You must have the GD extension installed in your development machine's PHP environment for this to work.

resources/views/docs/mobile/1/the-basics/splash-screens.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ Place the relevant files in the locations specified:
1515
### Requirements
1616
- Format: PNG
1717
- Minimum Size/Ratio: 1080 × 1920 pixels
18+
- GD PHP extension must be enabled, ensure it has enough memory (~2GB should be enough)

0 commit comments

Comments
 (0)