在上一页建立的 hello-aup/ 外层目录中,按以下顺序运行:
arc dsl format ./hello-aup --write
arc dsl lint ./hello-aup
arc dsl validate ./hello-aup
arc blocklet check ./hello-aup --profile minimal-app在 2.0.0-beta.25 上,新建 recipe 的三份 DSL 来源会被 format --write 改写为规范格式。这个输出表示格式化写入了文件;format_changed 是检查模式才会报告的诊断。先运行 format --write,再继续 lint、validate 和 profile check。验证结果包含一个 AUP app 的 agent、home 与 settings 页面,以及一个 Web section 和一个 agent。
直接运行
arc blocklet run ./hello-aupARC 会复用或启动本地 daemon,并打印两个实际访问 URL。不要为了首次验收部署到 DID Space,也不要手写猜测 host 或端口。在 Chrome 或 Firefox 中优先打开第一个 <name>.localhost 地址;需要时(包括 Safari)使用带 ?blocklet=<name> 的第二个地址。会话连上后,你应看到:
- blocklet 名称
hello-aup; App、Agent和Settings三个导航入口;- 标题
A tiny complete app.; - 正文说明这个 blocklet 含有 Web、AUP、agent 和 settings。
浏览器验收说明 renderer、session 和生成的 app 能共同工作。lint、validate 和 check 不替代这一步。
何时生成 JSON compatibility artifact
不要把下面的命令当作刚创建项目后的默认检查:
arc dsl generate ./hello-aup --check新 recipe 故意没有预先写 .aup/app.json、.aup/pages/*.json 与 .aup/wrapper.json,所以该检查会先报告它们 stale。只有某个兼容消费者需要物化产物时,才运行:
arc dsl generate ./hello-aup --write
arc dsl generate ./hello-aup --check这会同时建立 compatibility artifact 和 .aup/man/home.yaml 的说明骨架;不要把生成成功误读成每个手册或权限声明已经完成。