Skip to content

Commit 5948e6f

Browse files
committed
docs(mystralnative): clarify macOS packaging and remove bundler comparison
1 parent d8fa42f commit 5948e6f

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

docs/docs/guides/bundling.mdx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -419,20 +419,25 @@ mystral compile src/game.js --include assets --out dist/my-game
419419

420420
### macOS .app Bundle
421421

422-
For macOS distribution, use `--bundle-only` and the packaging script:
422+
For macOS distribution, use `--bundle-only` to create a standalone `.bundle` file, then use the `package-app.sh` script from the [MystralNative source repository](https://github.com/mystralengine/mystralnative) to wrap it in a `.app`:
423423

424424
```bash
425425
# Create the bundle file
426426
mystral compile dist/game.js --include assets --bundle-only --out dist/game.bundle
427427

428+
# Clone mystralnative (if you haven't already) for the packaging script
429+
git clone https://github.com/mystralengine/mystralnative.git
430+
428431
# Package as .app
429-
./scripts/package-app.sh \
432+
mystralnative/scripts/package-app.sh \
430433
--binary $(which mystral) \
431434
--name "My Game" \
432435
--bundle dist/game.bundle \
433436
--output dist
434437
```
435438

439+
> **Note:** `package-app.sh` is a helper script in the MystralNative source tree, not part of the `mystral` CLI itself. A built-in `mystral package` command may be added in the future.
440+
436441
## Development Workflow
437442

438443
### Without a Bundler (No npm Dependencies)
@@ -461,18 +466,6 @@ mystral run dist/game.js --watch
461466

462467
When you edit any source file, Vite rebuilds the bundle, and MystralNative detects the change and reloads automatically.
463468

464-
## Comparison of Bundlers
465-
466-
| Feature | Vite | esbuild | Bun |
467-
|---------|------|---------|-----|
468-
| Speed | Fast | Fastest | Fast |
469-
| TypeScript | Built-in | Built-in | Built-in |
470-
| npm packages | Yes | Yes | Yes |
471-
| Config needed | `vite.config.ts` | CLI flags | CLI flags |
472-
| Plugins | Rich ecosystem | Limited | Limited |
473-
| Tree shaking | Yes | Yes | Yes |
474-
| Best for | Complex projects | Simple projects | Bun users |
475-
476469
## Next Steps
477470

478471
- [Running Games](/mystralnative/docs/guides/running-games) - CLI usage and options

0 commit comments

Comments
 (0)