feat(kotlin-compose): design system + 33 components + gallery_kt + e2e android emulator + scaffolder fixes
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
---
|
||||
name: init_cpp_app
|
||||
kind: pipeline
|
||||
lang: bash
|
||||
domain: pipelines
|
||||
version: "0.1.0"
|
||||
purity: impure
|
||||
signature: "init_cpp_app(name: string, [--project <p>] [--domain <d>] [--desc <s>] [--tags <csv>]) -> void"
|
||||
description: "Scaffolder estandar de apps C++ del registry. Genera main.cpp + CMakeLists.txt + app.md siguiendo el patron canonico (cfg.about/log/panels, sin app_menubar manual, dockspace via framework), registra la app en cpp/CMakeLists.txt, inicializa repo Gitea dataforge/<name> y ejecuta fn index."
|
||||
tags: [cpp, imgui, scaffold, pipeline, bash, launcher]
|
||||
uses_functions:
|
||||
- ensure_repo_synced_bash_infra
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: []
|
||||
params:
|
||||
- name: name
|
||||
desc: "nombre de la app (snake_case). Sera el id en registry.db y el repo dataforge/<name>"
|
||||
- name: "--project"
|
||||
desc: "proyecto bajo projects/ donde crear la app (opcional). Si se omite va a cpp/apps/<name>/"
|
||||
- name: "--domain"
|
||||
desc: "dominio del registry (default: tools)"
|
||||
- name: "--desc"
|
||||
desc: "descripcion breve (frontmatter description + cfg.about/cfg.title)"
|
||||
- name: "--tags"
|
||||
desc: "tags CSV adicionales para el frontmatter (siempre se anade 'imgui')"
|
||||
output: "estructura completa de la app + entry registrada en cpp/CMakeLists.txt + repo Gitea + fn index"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "bash/functions/pipelines/init_cpp_app.sh"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```bash
|
||||
# App suelta en cpp/apps/<name>/
|
||||
fn run init_cpp_app my_tool --desc "Herramienta para X"
|
||||
|
||||
# App dentro de un proyecto
|
||||
fn run init_cpp_app finance_panel --project budget --desc "Panel de finanzas" --tags "finance,dashboard"
|
||||
```
|
||||
|
||||
## Que genera
|
||||
|
||||
```
|
||||
<dir>/
|
||||
main.cpp # Plantilla canonica: panels[] + cfg.about + cfg.log + run_app(cfg, render)
|
||||
CMakeLists.txt # add_imgui_app(<name> main.cpp)
|
||||
app.md # Frontmatter completo (lang:cpp, framework:imgui, dir_path, repo_url)
|
||||
```
|
||||
|
||||
Y ademas:
|
||||
|
||||
- Registra `add_subdirectory(apps/<name>)` (o el bloque `_DIR` para projects) en `cpp/CMakeLists.txt`.
|
||||
- Crea repo Gitea `dataforge/<name>` con master + commit inicial via `ensure_repo_synced_bash_infra` (requiere `GITEA_URL` y `GITEA_TOKEN`).
|
||||
- Ejecuta `fn index` para registrar la app en `registry.db`.
|
||||
|
||||
## Plantilla `main.cpp`
|
||||
|
||||
La plantilla cumple `cpp/PATTERNS.md`:
|
||||
|
||||
- NO llama `app_menubar` manual (lo dibuja el framework).
|
||||
- NO llama `DockSpaceOverViewport` (auto_dockspace=true por defecto).
|
||||
- Declara `panels[]` con un panel "Main" toggleable.
|
||||
- Setea `cfg.about` (window About) y `cfg.log` (logger + ventana Logs).
|
||||
|
||||
## Despues de crear
|
||||
|
||||
1. Editar `app.md` y completar `uses_functions` cuando la app consuma funciones del registry.
|
||||
2. Anadir las funciones del registry al `CMakeLists.txt` como paths absolutos: `${CMAKE_SOURCE_DIR}/functions/<dom>/<func>.cpp`.
|
||||
3. Build: `cd cpp && cmake --build build --target <name> -j`.
|
||||
Reference in New Issue
Block a user