跳到主要内容

ARC 2.0.0-beta.25

建立第一个 AUP app

用 minimal-app recipe 建立一条已验证的 ARC AUP 起步路径。

这条路径使用 minimal-app,因为它是当前 CLI 明确提供并能解释其来源、生成物和检查项的 recipe。它会建立一个完整切片,而不是伪装成纯 AUP app。

先查看 recipe 的边界

bash
arc blocklet recipe explain minimal-app

2.0.0-beta.25 上,输出说明它包含 webaupagentsettings 四项 capability,并列出 source DSL、AFS data、兼容产物与 profile check。

建立 app

bash
arc blocklet create ./hello-aup --recipe minimal-app --name hello-aup

本页验证时,CLI 确认创建了 18 个文件,并给出一条针对创建后绝对路径的下一步验证命令。创建目录会因你的当前位置而不同,因此不要把输出中的绝对路径当成教程常量。

text
Created minimal app blocklet "hello-aup" with 18 file(s).

生成后,先阅读这些来源而不是改生成物:

文件角色
.aup/app.aupAUP app 的 DSL 来源
pages/index/layout.aupWeb 页面布局的 DSL 来源
.web/components/app-hero/component.dsl站点组件 manifest 的 DSL 来源
agents/app-agent/agent.dslagent manifest 的 DSL 来源
seed/settings/.../settings.aupsettings 来源

recipe 同时写出某些 JSON compatibility artifact,但不会预先物化 .aup/app.json.aup/pages/*.json.aup/wrapper.json。如果你的消费者明确要求这些 artifact,读 生成、lint 与迁移;不要在没有需要时手改它们。

继续到 验证、运行与查看