examples README

项目的 README,来自 github.com/geastack/examples。合并为一个 markdown 文件:README.md。

GeaStack Examples

Example applications and tools for GeaStack.

This repo is the app gallery used by the simulator, embedded targets, GeaOS, and Apple targets. Each example is a small package with a gea manifest in package.json.

What Is Here

Path Purpose
apps/* Gea apps. Most are TSX apps targeting web, ESP32, and/or GeaOS.
apps/*/package.json App manifest, target compatibility, scripts, and launcher metadata.
tools/dialer-browser Small browser-side helper tool for dialer workflows.
shared Components shared by several apps (Dialer, Settings).
assets Shared fonts.
scripts Repository-level checks (the bouncing-balls FPS gate).
benchmarks Native hello-window memory comparison (AppKit, Qt, Tauri, ...).
.gea/boards.json Project board aliases (empty; aliases are machine-local).
package.json npm workspace root for apps/* and tools/*, with the GeaStack CLI and compiler as dev dependencies.
docs Catalog and contribution guidance.

Quick Start

Install once at the repository root; the apps are npm workspaces and share that installation, including @geastack/cli:

npm install

Type-check an individual example:

cd apps/watch
npm run check

Some examples have tests, mostly for a layout or a device setup. Run them with npm test in the app folder.

Run an app on the web from its folder with the Gea CLI:

cd apps/watch
npx gea dev                      # real DOM + CSS dev server with HMR
npx gea simulate                 # the same DOM app inside an adjustable device viewport
npx gea simulate --renderer wasm # embedded C++ renderer in the browser; needs Emscripten
npx gea build --target web       # static site in .gea/build/web/site

Flash a compatible board through the Gea CLI, after registering it once with npx gea setup (which names its alias):

npx gea flash watch --board <alias>
npx gea flash watch --board <alias> --monitor

Documentation

App Manifest Basics

Every buildable app should have a package.json with a gea field:

{
  "gea": {
    "id": "watch",
    "name": "Watch",
    "entry": "index.tsx",
    "runtime": "gea",
    "targets": {
      "web": true,
      "esp32": true,
      "geaos": true
    }
  }
}

The manifest is consumed by the gea CLI, the simulator, embedded board builds, GeaOS, and Apple targets. Keep it accurate.

Maintenance Notes

License

MIT (see LICENSE). You can ship closed-source products built on it. The only GeaStack code under a different license is the embedded board support (targets and @geastack/chips, GPL-3.0-only): shipping closed-source firmware through those needs a commercial license. Contact [email protected] for commercial terms, support and hosted builds.

examples (geastack/examples)

正在搜索数据库…

这是什么?这是 GeaStack 的示例应用画廊——一组 Gea 示例应用,供模拟器、嵌入式开发板、GeaOS、Apple 目标平台以及 VS Code/Cursor 扩展用来测试和演示该平台。
它本身是一个框架,还是只是某个框架的示例?它不是框架——而是一个 monorepo,收录了小型 Gea 应用(大多是 TSX),package.json 中带有 gea 清单,每个应用为托管在别处的 GeaStack 框架验证一种目标平台行为。
这些示例怎么运行?对带测试的应用,在各自的应用文件夹内运行 npm test;或者通过设置 GEAAPPSROOT(或传入 --app-dir)把独立的 geastack/simulator 仓库指向本检出,让它的脚本能读取这些应用。
我也需要 simulator 仓库吗?需要——驱动这些应用的 Web 循环由另一个仓库 geastack/simulator 运行;只要把模拟器指向本仓库,两个检出不必相邻放置。
我可以发布基于它构建的闭源固件吗?只有避开嵌入式开发板支持代码才行:这里其余内容都是 MIT 许可,但 targets 包和 @geastack/chips 采用 GPL-3.0-only,通过它们做闭源固件需要 GeaStack 的商业许可。
单个 Gea 应用能支持哪些目标平台?Gea 应用的 package.json 清单声明目标平台兼容性,apps/ 下的大多数应用是 TSX 应用,可以同时在 Web、ESP32 和/或 GeaOS 上运行。
示例目录是如何组织的?每个示例都是 apps/ 下独立的包,带有 package.json 清单;docs/EXAMPLE-CATALOG.md 列出了分类和目标平台兼容性,docs/DEVELOPMENT.md 介绍了如何添加或维护示例。
dialer-browser 工具是做什么的?它是放在 tools/dialer-browser 下的一个小型浏览器端辅助工具,用于拨号器相关工作流,与 Gea 应用示例本身相互独立。
作者
geastack
大小
23.8 MB
星标
120
更新
提交Nov 18
时长
2个月
提交 · 90 天