domo-app-publish

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Build & Deploy Workflow

构建与部署工作流

Prerequisites

前提条件

  • Node.js installed
  • Domo CLI installed (
    npm install -g @domoinc/ryuu
    )
  • 已安装Node.js
  • 已安装Domo CLI(
    npm install -g @domoinc/ryuu

Local development

本地开发

bash
npm install          # Install dependencies
npm run dev          # Start dev server (usually Vite)
For API calls to work locally, you need ryuu-proxy configured and
domo login
authenticated.
bash
npm install          # 安装依赖
npm run dev          # 启动开发服务器(通常为Vite)
要让本地API调用正常工作,你需要配置ryuu-proxy并通过
domo login
完成身份验证。

Build for production

生产环境构建

bash
npm run build        # Outputs to dist/ (Vite) or build/ (CRA)
bash
npm run build        # 输出到dist/目录(Vite)或build/目录(CRA)

Domo CLI Authentication

Domo CLI身份验证

bash
domo login           # Authenticate with your Domo instance
You'll be prompted for your Domo instance URL and credentials.
bash
domo login           # 与你的Domo实例进行身份验证
系统会提示你输入Domo实例URL和凭据。

Publishing

发布

bash
cd dist              # Change to build output directory
domo publish         # Publish to Domo
Important - First publish:
  • On first publish, Domo generates a new
    id
    for your app
  • This ID appears in the published
    manifest.json
    in your dist folder
  • You must copy this ID back to your source
    manifest.json
    (e.g.,
    public/manifest.json
    )
  • If you don't, every publish creates a NEW app instead of updating the existing one
bash
undefined
bash
cd dist              # 切换到构建输出目录
domo publish         # 发布到Domo
重要提示 - 首次发布:
  • 首次发布时,Domo会为你的应用生成一个新的
    id
  • 该ID会出现在dist文件夹中已发布的
    manifest.json
    文件里
  • 你必须将此ID复制回源码中的
    manifest.json
    文件
    (例如
    public/manifest.json
  • 如果不这样做,每次发布都会创建一个新应用,而非更新现有应用
bash
undefined

After first publish, copy the generated ID:

首次发布后,复制生成的ID:

dist/manifest.json → public/manifest.json (just the "id" field)

dist/manifest.json → public/manifest.json(仅复制"id"字段)

undefined
undefined

Subsequent publishes

后续发布

Once the ID is in your source manifest:
bash
npm run build && cd dist && domo publish
一旦ID已添加到源码的manifest文件中:
bash
npm run build && cd dist && domo publish

Build Checklist

构建检查清单

Before publishing, ensure:
  • manifest.json
    has correct
    dataSetId
    (not
    id
    ) for datasets
  • manifest.json
    has
    fields: []
    in each dataset mapping
  • thumbnail.png
    exists and is 300x300 pixels
  • All queries use
    .select()
    with specific columns (never fetch all columns)
  • Each visualization has its own optimized query
  • No
    .aggregate()
    calls (use
    .groupBy()
    or client-side aggregation)
  • .groupBy()
    calls have a grouping column (not just aggregations)
发布前,请确保:
  • manifest.json
    中为数据集配置了正确的
    dataSetId
    (而非
    id
  • 每个数据集映射中包含
    fields: []
  • 存在
    thumbnail.png
    且尺寸为300x300像素
  • 所有查询均使用
    .select()
    指定特定列(绝不获取所有列)
  • 每个可视化组件都有其优化后的查询
  • 未使用
    .aggregate()
    调用(请使用
    .groupBy()
    或客户端聚合)
  • .groupBy()
    调用包含分组列(而非仅聚合操作)