@clarketm/saga-monitor

中文文档
2.0.1发布于 2019/02/12MITESM + CJS近 30 天下载 2.9万

Simple, elegant, and configurable redux-saga monitor.

原始使用文档
文档目录8 节
  1. Installation
  2. Yarn
  3. NPM
  4. CDN
  5. Configuration
  6. Usage
  7. Credits
  8. License

Saga Monitor

NPM release Build Status License

Simple, elegant, and configurable redux-saga monitor.

Installation

Yarn

$ yarn add @clarketm/saga-monitor

NPM

$ npm install @clarketm/saga-monitor --save

CDN

.es.js.js.min.js
🔗🔗🔗

Configuration

const defaultConfig = {
  level: "debug", // logging level
  verbose: true, // verbose mode
  color: "#03A9F4", // default color
  effectTrigger: false, // show triggered effects
  effectResolve: false, // show resolved effects
  effectReject: false, // show rejected effects
  effectCancel: false, // show cancelled effects
  actionDispatch: false // show dispatched actions
};

Usage

import createSagaMonitor from "@clarketm/saga-monitor";

// configuration
const config = {
  level: "log",
  effectTrigger: true,
  effectResolve: true,
  actionDispatch: true
};

const middleware = [
  // create saga middleware w/ sagaMonitor
  createSagaMiddleware({
    sagaMonitor: createSagaMonitor(config)
  })
];

console output

Run $$LogSagas() in the developer console to display a snapshot of all the available sagas.

console output

Credits

This was adapted from the sagaMonitor example in the redux-saga repository.

License

MIT © Travis Clarke

版本与发布记录

@clarketm/saga-monitor 共发布 13 个版本,首次发布于 2018/10/09;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.102019/02/127 年前
2.0.1latest2019/02/127 年前
2.0.02019/02/097 年前
1.0.92019/02/097 年前
1.0.82018/11/217 年前
1.0.72018/11/217 年前

关于 @clarketm/saga-monitor 的常见问题

@clarketm/saga-monitor 是什么?

Simple, elegant, and configurable redux-saga monitor.

如何安装 @clarketm/saga-monitor?

在项目目录运行 npm install @clarketm/saga-monitor,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:redux-saga(>=1.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@clarketm/saga-monitor 支持 TypeScript 吗?

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

@clarketm/saga-monitor 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@clarketm/saga-monitor 可以商用吗?

@clarketm/saga-monitor 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@clarketm/saga-monitor 的下载量有多少?

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

@clarketm/saga-monitor 还在维护吗?

最新版本 2.0.1 发布于 2019/02/12(7 年前);至今共发布 13 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/10/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。