npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deppon/pm-toolkit

v2.5.98

Published

德邦 PRD 产品经理工具包脚手架:create 开箱工作台;init/update 同步工具

Readme

@deppon/pm-toolkit

德邦 产品经理工具包 脚手架。

修订记录见 CHANGELOG.md每次改版本发布前必须追加对应条目,再执行:

npm run publish:auto   # 先校验 CHANGELOG 含当前 version,再 npm publish

| 命令 | 做什么 | | --------------------- | ---------------------------------------------------------------------- | | create <名> | 新建带壳层的空项目(开箱即用;必须指定 --lines;TTY 询问 repos) | | init / update | 同步工具;项目尚无业务线时也必须--lines | | lines-repos | 交互配置各业务线 PC/手机本地仓(frontend、backend、mobileFrontend、mobileBackend) | | code-search | 关键词检索(--side=frontend\|backend\|mobileFrontend\|mobileBackend\|mobile\|all) | | postinstall | npm i @deppon/pm-toolkit 后自动跑一遍 update |

开箱:新建项目

npx @deppon/pm-toolkit create my-prd --lines=oms:订单中心,wms:仓储 --platforms=oms:pc,mobile,wms:pc
cd my-prd
npm run version:serve

--lines 必填id:显示名,多条用逗号分隔(如 oms:订单中心,wms:仓储)。id 作目录名(小写字母/数字/_/-),不可为 other

端(platforms) 也要带上(否则 TTY 下会按业务线逐个询问--yes / CI 默认仅 pc):

| 写法 | 含义 | | --- | --- | | 交互(推荐) | 不传 --platforms:每条线用 ↑↓ / 空格勾选 / 回车下一线 | | --platforms=pc,mobile | 全部线同一套端 | | --platforms=oms:pc,mobile,wms:pc | 按线逗号分隔(非交互一次写清) | | --platforms=pc+mobile,pc | 按序--lines 一一对应(组内用 +) | | 行内:oms:订单@pc,mobile | 写在 --lines 里(该线不再询问) |

多业务线示例:

# 交互:会分别问 oms、wms 的端
npx @deppon/pm-toolkit create my-prd --lines=oms:订单,wms:仓储

# 非交互一次写清
npx @deppon/pm-toolkit create my-prd \
  --lines=oms:订单,wms:仓储 \
  --platforms=oms:pc,mobile,wms:pc

会得到:

  • 全局壳层 src/prototypes/prototype.html(按产品线动态侧栏;mobile 页套手机外框预览
  • lines.json(产品线 id/label/platforms + 本机 repos建议 gitignore
  • nav.json(侧栏菜单,可入库;含 platform;Live Server 可读;智能体新增页必须更新)
  • 子页目录:
    • 兼容旧:pages/<产品线>/<主题>/(视为 pc
    • 新约定:pages/<产品线>/pc/<主题>/pages/<产品线>/mobile/<主题>/
  • JoyCode 智能体 + skills + 版本服务脚本 + MCP
  • 开箱示例(挂在第一条业务线):
    • pcsample-list(PC 列表)
    • mobilemobile/sample-list(运单查询)+ mobile/sample-form(寄件下单)
  • package.json 常用脚本:version:* / pm:update

开启手机端产品线

create 时用 --platforms=pc,mobile(或行内 @pc,mobile)即可写入 platforms 并生成手机示例。也可事后手改 lines.json

{
  "id": "oms",
  "label": "订单中心",
  "platforms": ["pc", "mobile"],
  "repos": {
    "frontend": "/abs/path/oms-web",
    "backend": "/abs/path/oms-api",
    "mobileFrontend": "/abs/path/oms-h5",
    "mobileBackend": "/abs/path/oms-mobile-api",
    "notes": "手机前后端可与 PC 共用则对应项留空"
  }
}

新页落盘到 pages/oms/mobile/<主题>/,并在 nav.json"platform":"mobile"(或跑 update / version:serve 扫盘)。

浏览器可用 npm run version:serveLive Server 打开 prototype.html(须已有最新 nav.json)。版本快照 / 新建版本仍建议用 version:serve

create / 首次写入业务线时,TTY 下会询问每条线的本地仓路径;--yes / CI / 非 TTY 跳过并打印提醒。也可事后:

npx deppon-pm lines-repos
npx deppon-pm code-search oms 报价单号 --side=frontend
npx deppon-pm code-search oms 下单 --side=mobileFrontend
npx deppon-pm code-search oms 下单 --side=mobile

首次进入项目建议:

cd my-prd
npm install
npm run version:serve
# 升级工具(会先把 @deppon/pm-toolkit 升到 npm latest,再同步壳层 / skills):
npm run pm:update
# 预演:
npm run pm:update:dry
# 补配代码仓路径:
npx deppon-pm lines-repos

已有项目:只装工具

npm i -D @deppon/pm-toolkit@latest
# postinstall 已自动 sync(项目须已有 lines.json);也可手动:
npx deppon-pm init
# 或
npx deppon-pm update

老脚手架升级(侧栏空白 / 不必 recreate)

旧版 create 的壳层可能只有空的 #lineNavHost、未调用 ShellLines.load,仅 update 以前不会修好侧栏。从本版起,update / init 会自动:

  1. 同步最新 shell-lines.js + shell-boot.js(兜底渲染侧栏)
  2. 修补 prototype.html(补 lineNavHost / 脚本引用,不整文件覆盖
  3. pages/ 扫盘刷新可入库的 nav.json(Live Server 侧栏依赖它)

侧栏从哪来?(Live Server 也要能看)

| 用途 | 权威来源 | | --- | --- | | 产品线 id / 显示名 / platforms / 本机 repos | lines.json(建议 gitignore) | | 侧栏有哪些业务子页 | nav.json(可入库,含 platformversion:serve 另提供实时 /api/nav | | 页面文件 | pages/<lineId>/[pc\|mobile/]<主题>/index.html(旧三层路径 = pc) |

智能体新增页后必须改 nav.json(含 platform。侧栏按 PC / 手机分组;打开 mobile 页时主区显示手机外框(样式在 assets/shell-phone-frame.csspm:update 会同步,不必 --force-workspace)。
npx deppon-pm update / npm run version:serve 也会按 pages/ 扫盘刷新 nav.json

同事用老版本建的项目,请在项目根执行:

npm i -D @deppon/pm-toolkit@latest
npm run pm:update
# 或:npx @deppon/pm-toolkit@latest update
npm run version:serve

然后硬刷新浏览器。Live Server 打开 prototype.html 也可看侧栏(须已有最新 nav.json)。版本快照仍建议用 version:serve

若项目尚无 src/prototypes/lines.json(或业务线为空),init / update 必须--lines,并会补写壳层与业务线:

npx deppon-pm update --lines=oms:订单中心,wms:仓储

已有业务线时追加新线(不必重写旧线):会合并进 lines.json,并自动创建 pages/<id>/

npx deppon-pm update --lines=oms:订单中心,wms:仓储
# 可选:--platforms=oms:pc,mobile,wms:pc

普通 npx deppon-pm update(不带 --lines)也会按现有 lines.json 补齐缺失的 pages/<id>/ 目录。

此时若还要强制覆盖壳层:

npx deppon-pm update --force-workspace --lines=oms:订单中心,wms:仓储

命令对照

npx deppon-pm create my-prd --lines=oms:订单,wms:仓储 --platforms=oms:pc,mobile,wms:pc
npx deppon-pm create demo --lines=oms:订单,wms:仓储 --platforms=pc+mobile,pc --yes
npx deppon-pm init                                     # 已有业务线:只同步工具
npx deppon-pm update                                   # 已有业务线:升级工具 + 补齐 pages/<id>/
npx deppon-pm update --lines=oms:订单,wms:仓储         # 追加新业务线 + 建目录(保留旧线)
npx deppon-pm update --lines=oms:订单,wms:仓储 --platforms=oms:pc,mobile,wms:pc
npx deppon-pm create demo --lines=oms:订单 --dry-run

跳过自动同步:DEPON_PM_SKIP_POSTINSTALL=1 npm i @deppon/pm-toolkit

日常

  1. JoyCode 选「德邦 PRD 产品经理」
  2. 产出:src/prototypes/pages/<产品线>/<主题>/(见 lines.json
  3. 发布文档站:npm run build:test

Anno Rail 注意:业务子页右栏须 .anno-card[data-anno-id] + AnnoRail.init禁止 .anno-item / data-anno-target(否则右栏无卡片样式)。见 skill deppon-prd-generator 技术约定第 8 条与 memory feedback_anno_rail_dom.md

原型单文件:业务子页默认只交 index.html(内联业务 JS)+ DP-*PRD.md禁止默认拆 app.js(见 memory feedback_prototype_single_file.md)。

维护方

cd packages/deppon-pm-toolkit
npm run sync:assets
npm publish