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: README.md
+17-13Lines changed: 17 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Lynxtron Showcases
2
2
3
-
A monorepo of Lynxtron showcase apps. **Lynxtron GO** is a playground app (like Electron Fiddle) that can fetch, edit, build, and run any showcase in this repository.
3
+
A monorepo of Lynxtron showcase apps. **Lynxtron Go** is a project editor and
4
+
showcase runner that can fetch, edit, build, and run any showcase in this
5
+
repository.
4
6
5
7
## Repository Structure
6
8
@@ -11,7 +13,7 @@ lynxtron-show-cases/
11
13
cli/ @lynxtron-examples/cli — CLI for fetching, building, running showcases
12
14
showcases/
13
15
counter/ minimal counter example (full Lynxtron app)
14
-
lynxtron-go/ Lynxtron GO playground app (IDE shell)
16
+
lynxtron-go/ Lynxtron Go project editor and showcase runner
15
17
scripts/
16
18
preview.sh one-command preview flow
17
19
local-registry.sh local npm registry for testing
@@ -26,11 +28,11 @@ lynxtron-show-cases/
26
28
27
29
## Install Notes
28
30
29
-
The repo pins runtime and toolchain expectations in root `package.json`:
31
+
The repo pins runtime and toolchain expectations in root configuration:
30
32
31
-
-`engines.node` requires Node.js `>=22`
32
-
-`packageManager` is `pnpm@10.15.1`
33
-
-`pnpm.onlyBuiltDependencies` allows `@lynx-js/lynxtron` and `@lynx-js/lynxtron-builder`to run their install scripts
33
+
-root `package.json` requires Node.js `>=22` and pins `pnpm@10.15.1`;
34
+
-`pnpm-workspace.yaml` allows the Lynxtron runtime, builder, and required
35
+
native dependencies to run their install scripts.
34
36
35
37
After `pnpm install`, check whether pnpm skipped any build scripts:
36
38
@@ -64,7 +66,7 @@ pnpm test
64
66
65
67
## Preview Mode (Development)
66
68
67
-
One command to pack all showcases, start a local npm registry, build Lynxtron GO in preview mode, and launch:
69
+
One command to pack all showcases, start a local npm registry, build Lynxtron Go in preview mode, and launch:
68
70
69
71
```bash
70
72
pnpm preview
@@ -73,10 +75,11 @@ pnpm preview
73
75
This will:
74
76
1. Build each showcase and pack its source plus verified `dist_precompiled/` artifact
75
77
2. Start a local Verdaccio registry and publish `@lynxtron-examples/*` packages
76
-
3. Build Lynxtron GO with `LYNXTRON_PREVIEW=1` (bakes `file://` tarball URLs)
77
-
4. Launch Lynxtron GO desktop app
78
+
3. Build Lynxtron Go with `LYNXTRON_PREVIEW=1` (bakes `file://` tarball URLs)
79
+
4. Launch Lynxtron Go desktop app
78
80
79
-
In the app: **Cmd+P → type `>` → "Open Showcase"** to see the showcase list.
81
+
In the app, open the Gallery from the folder button in the command bar. The
82
+
command palette also exposes showcase commands through **Cmd+P → `>`**.
80
83
81
84
```bash
82
85
# Build only (don't launch)
@@ -115,7 +118,7 @@ lynxtron-examples run counter
115
118
lynxtron-examples list
116
119
```
117
120
118
-
## Lynxtron GO Commands
121
+
## Lynxtron Go Commands
119
122
120
123
Open the command palette with **Cmd+P → type `>`**:
121
124
@@ -148,8 +151,9 @@ test and release a showcase.
148
151
149
152
Key design decisions:
150
153
-**Full Lynxtron apps**: Each showcase includes host process + Lynx UI, runs as independent desktop window
151
-
-**Thin Launcher**: CLI handles all logic; Lynxtron GO is a UI shell
154
+
-**Host-owned execution**: preload services and the CLI install, verify, build,
155
+
cache, and launch projects outside the Lynx renderer
152
156
-**Baked-in registry**: Showcase list injected at build time; preview uses `file://` tarballs, release uses GitHub URLs
153
157
-**Unified URL model**: Zero code difference between preview and production
154
158
-**Shared toolchain**: Core Lynx SDK and build tools managed at workspace level
155
-
-**NDJSON protocol**: CLI communicates with Lynxtron GO via newline-delimited JSON on stdout
159
+
-**NDJSON protocol**: CLI communicates with Lynxtron Go via newline-delimited JSON on stdout
-`showcase.description` — shown in Lynxtron GO's showcase list
98
+
-`showcase.description` — shown in Lynxtron Go's showcase list
97
99
-`showcase.tags` — used for filtering (`beginner`, `advanced`, `animation`, etc.)
98
100
-`showcase.minToolchainVersion` — minimum `@lynxtron-examples/*` version required
99
101
-`showcase.distribution` — omit for a GitHub Release asset; use `"builtin"`
@@ -172,7 +174,7 @@ app.whenReady().then(() => {
172
174
173
175
Each showcase slice must ship with its own self-contained `tsconfig.json`.
174
176
175
-
Do not use `extends` that points outside the showcase package, for example `../../../tsconfig.app.json`. Lynxtron GO unpacks showcases into standalone workspaces under `~/.lynxtron-go/showcases/<name>`, so package-external `extends` paths will break diagnostics there even if they work inside this monorepo.
177
+
Do not use `extends` that points outside the showcase package, for example `../../../tsconfig.app.json`. Lynxtron Go unpacks showcases into standalone workspaces under `~/.lynxtron-go/showcases/<name>`, so package-external `extends` paths will break diagnostics there even if they work inside this monorepo.
176
178
177
179
`src/app/tsconfig.json`:
178
180
@@ -469,7 +471,7 @@ To test the dist distribution flow locally, use the local registry script.
469
471
This validates the same product promise that preview is meant to protect:
470
472
471
473
- showcases are packed with verified `dist_precompiled/` artifacts
472
-
- Lynxtron GO can consume them
474
+
- Lynxtron Go can consume them
473
475
- the user does not need to manually rebuild showcase source code just to preview them
474
476
475
477
Use the local registry script for that flow:
@@ -524,9 +526,9 @@ Merging that PR triggers publishing:
524
526
-**npm** — the public `@lynxtron-examples/*` packages are published to the npm
525
527
registry via `changeset publish` using npm **OIDC trusted publishing** (no
526
528
long-lived `NPM_TOKEN`). `@lynxtron-examples/cli` is `private: true` — it is
527
-
bundled inside Lynxtron GO at build time and is not published to npm.
529
+
bundled inside Lynxtron Go at build time and is not published to npm.
528
530
-**GitHub Release** — a `lynxtron-go-v<version>` release is created with:
529
-
- Lynxtron GO installers: `*.dmg` (macOS) and `*-Setup.exe` (Windows), built via
531
+
- Lynxtron Go installers: `*.dmg` (macOS) and `*-Setup.exe` (Windows), built via
530
532
`lynxtron-builder`.
531
533
- Every publishable showcase (a package with `showcase` metadata) packed as a
532
534
`.tgz` containing source, `.lynxtron-release.json`, and `dist_precompiled/`.
@@ -545,7 +547,7 @@ to have an OIDC trusted publisher configured, pointing at this repository's
545
547
# Pack every publishable showcase into dist/showcase-artifacts/*.tgz
546
548
node scripts/pack-showcases.mjs
547
549
548
-
# Build the Lynxtron GO installer for the current platform
550
+
# Build the Lynxtron Go installer for the current platform
549
551
pnpm --dir lynxtron-go run pack # macOS dmg
550
552
pnpm --dir lynxtron-go run pack:win # Windows nsis
[LynxDevTool](https://github.com/lynx-family/lynx-devtool/releases/) is optional
33
+
and only required for runtime inspection and debugging.
34
+
42
35
## Usage Guide
43
36
37
+
Run commands from the monorepo root.
38
+
44
39
### Install Dependencies
45
40
46
-
```bash
41
+
```sh
47
42
pnpm install
48
43
```
49
44
50
45
If pnpm reports ignored build scripts for `@lynx-js/lynxtron` or `@lynx-js/lynxtron-builder`, run `pnpm approve-builds` and allow both packages before launching the app.
51
46
52
47
### Development
53
48
54
-
-**Desktop (Lynxtron)**
55
-
```bash
56
-
npm run dev
57
-
```
49
+
```sh
50
+
# Start the renderer and desktop host watchers
51
+
pnpm --dir lynxtron-go dev
52
+
53
+
# Launch the already-built desktop host with the inspector enabled
54
+
pnpm --dir lynxtron-go run run-dev
55
+
```
58
56
59
57
### Build & Start
60
58
61
-
-**Build for Production**
62
-
```bash
63
-
npm run build
64
-
```
59
+
```sh
60
+
# Build all Lynxtron Go assets
61
+
pnpm --dir lynxtron-go build
65
62
66
-
-**Start Desktop**
67
-
```bash
68
-
npm start
69
-
```
63
+
# Build and launch the desktop app
64
+
pnpm --dir lynxtron-go start
70
65
71
-
-**Start Web**
72
-
```bash
73
-
npm run start:web
74
-
```
66
+
# Validate without launching
67
+
pnpm --dir lynxtron-go run typecheck
68
+
pnpm --dir lynxtron-go test
69
+
```
75
70
76
71
### Application Packaging
77
72
78
-
-**Package for macOS (x64)**
79
-
```bash
80
-
npm run pack:mac:x64
81
-
```
82
-
83
-
-**Package for macOS (arm64)**
84
-
```bash
85
-
npm run pack:mac:arm64
86
-
```
73
+
```sh
74
+
# Package for the current macOS architecture
75
+
pnpm --dir lynxtron-go pack
87
76
88
-
-**Package for macOS (Universal)**
89
-
```bash
90
-
npm run pack:mac:universal
91
-
```
92
-
93
-
-**Package for Windows (ia32)**
94
-
```bash
95
-
npm run pack:win
96
-
```
77
+
# Package the Windows x64 installer
78
+
pnpm --dir lynxtron-go run pack:win
79
+
```
97
80
98
81
## Debugging
99
82
100
-
For detailed debugging strategies, including how to debug the Renderer, Main Process, and Native Modules, please refer to [Debug Strategy](docs/DEBUG_STRATEGY.md).
83
+
Use `pnpm --dir lynxtron-go run debug:detached` for a detached native-debug
84
+
session. See the [documentation index](docs/README.md) for current architecture
0 commit comments