@glific/flow-editor

中文文档
1.43.0-21发布于 2026/11/13AGPL-3.0近 30 天下载 3415

'Standalone flow editing tool designed for use within the Glific suite of messaging tools'

原始使用文档
文档目录9 节
  1. Prerequisites
  2. Installation (to use this in your project)
  3. Building/Contribution
  4. Development
  5. Localization
  6. Running Tests
  7. Formatting
  8. Publishing
  9. Contributing

Flow Editor

This is a standalone flow editing tool designed for use within the Glific suite of messaging tools but can be adopted for use outside of that ecosystem. The editor is a React component built with TypeScript and bundled with Webpack. It is open-sourced under the AGPL-3.0 license.

You can view and interact with the component here.

Prerequisites

yarn
Node.js >= 16.x

Installation (to use this in your project)

The flow editor is a non-ejected project based on create-react-app. We use yarn to manage dependencies.

npm i @glific/flow-editor
yarn add @glific/flow-editor

Building/Contribution

Webpack is used to transpile TypeScript and SASS. After invoking a build, the compiled results will arrive in /build.

% yarn install
% yarn run build

Development

To run the flow editor in development mode, it requires an asset server. Currently this requires a RapidPro instance running in EDITOR_DEV_MODE.

Localization

The project is fully localized using i18next and leans on react-i18next to integrate it inside components. To generate new keys and defaults for localization, we use i18next-scanner. Use the yarn command scan to update localization keys.

% yarn scan

This file is then uploaded to Transifex for broad language translations. Once a language reaches full translation, it will be merged into the project.

Running Tests

This project uses Jest for unit/snapshot testing and react-testing-library where we can. The project has some older more complex tests that use Enzyme. Typescript and Jest are integrated via ts-jest.

% yarn test

Note that running this locally will automatically multithread based on how many cores your box has. It will also run it in the interactive watch mode. This mode is what you can use to easily run only failed tests or update snapshots. When this same command is run on CI, the tests will be run without watch mode automatically.

You can also run tests locally without watch mode

% yarn test --watchAll=false

Formatting

Prettier is used to keep formatting consistent. We use huskey pre-commit hooks to run prettier on every commit.

It is possible to run prettify against the entire project without commits. This is only necessary if the project conventions change.

% yarn run prettify

Publishing

To publish, simply invoke the desired semver -- patch, minor or major. This will version the package and travis will publish it to the npm repository automatically.

% yarn version --patch
% git push --tags

Contributing

We encourage you to open issues on this project with any bugs you encounter or to make feature requests.

版本与发布记录

@glific/flow-editor 共发布 129 个版本,首次发布于 2021/04/09;过去 12 个月发布了 15 个版本。

版本发布日期距今
1.43.0-21latest2026/11/133 天前
1.43.0-202026/10/2819 天前
1.43.0-192026/09/291 个月前
1.43.0-182026/09/211 个月前
1.43.0-172026/09/211 个月前
1.43.0-162026/09/181 个月前

关于 @glific/flow-editor 的常见问题

@glific/flow-editor 是什么?

'Standalone flow editing tool designed for use within the Glific suite of messaging tools'

如何安装 @glific/flow-editor?

在项目目录运行 npm install @glific/flow-editor,或使用 pnpm add / yarn add / bun add。

@glific/flow-editor 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/glific__flow-editor 是否存在。

@glific/flow-editor 可以商用吗?

@glific/flow-editor 使用 AGPL-3.0 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@glific/flow-editor 的下载量有多少?

根据 npm 官方下载统计,@glific/flow-editor 在 2026/10/17 – 2026/11/15 这 30 天内被下载 3,415 次,日均约 114 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@glific/flow-editor 还在维护吗?

最新版本 1.43.0-21 发布于 2026/11/13(3 天前);至今共发布 129 个版本,其中过去 12 个月发布了 15 个;首次发布于 2021/04/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。