Skip to content

docs: 安装说明加上 dsh plugin 一行命令,给插件市场投稿用 - #8

Merged
modusensus merged 1 commit into
mainfrom
docs/market-submission
Nov 12, 2026
Merged

modusensus merged 1 commit into
mainfrom
docs/market-submission

Conversation

@modusensus

Copy link
Copy Markdown
Member

为什么改

要去插件市场投稿,三个市场的硬性要求里有一条本仓库原来不满足:

  • dsh-plugin.org 的提交模板有一个必填项叫「Install command — a command you actually ran and that succeeded」,占位符写的就是 dsh plugin --profile web add dsh-xxx。
  • awesome-dsh-plugin 的 contributing 里写「The repo declares a dsh.bundle manifest(this is what makes it installable via dsh plugin add)」——我们有这个 manifest,但 README 里没告诉人可以用那条命令。

原来的 README 只有「npm install + 手改 profile 的 package.json 两处登记」这一条路。能用,但对第一次装的人是两道手工活,而且market 的提交表单只认一行命令。

改了什么

README.md 的安装节重排:

改前 改后
方式一:npm(推荐) 方式一:dsh plugin(推荐) —— 一行装完
方式二:从源码 方式二:npm 手动装(原文照搬)
— 方式三:从源码(原文照搬)

新增的那条:

dsh plugin --profile web add dsh-cura

顺带把开头那句「需要已装好 dsh-onebot-qq」改成可选。这不是文案美化——careGlobal 那版之后生活关怀层本来就不依赖 QQ 通道,只想要健康记录/常用坐标/高德瑞幸的人装 dsh-onebot-qq 是白装。原来的写法会让这类用户直接放弃。

验证

这条命令我在本机真跑过,不是照抄模板:

$ dsh plugin --profile verify-cura add dsh-cura
dsh: initialized profile verify-cura at D:\DSH\.dsh\profiles\verify-cura
+ dsh-cura 0.8.0
Done in 4.4s using pnpm v11.23.0

装完读 profile 的 package.json:dsh.profile.bundles 里自动出现了 dsh-cura,不需要手改——我原本以为要补一步,实测是插件管理器自己 reconcile 的(dsh-plugin-manager/lib/types/operations.js 里 bundleManifest() 读 dsh.bundle.patch 后 push 进 bundles 数组)。

再验一次显式版本:

$ dsh plugin --profile verify-cura2 add dsh-cura@0.9.1
+ dsh-cura 0.9.1
Done in 3s

八套测试全绿(24241ms),这次只动了 Markdown,测试不受影响。

一个诚实的提醒

dsh plugin add dsh-cura 不带版本号时会解析成 ^<latest>,pnpm 会追加一条 minimumReleaseAgeExclude 到 profile 的 pnpm-workspace.yaml(这次是 dsh-cura@0.9.1)。这是 pnpm 11 对新发布包的默认保护,不是我们的问题,但第一次装的人会看到一行提示,别以为是报错。

dsh-plugin.org 的提交模板要求填一条「实际跑通过的安装命令」,
仓库里原来只有 npm install + 手改 bundles 两步。补一条一行命令装完的
路径,放在最前面作为推荐方式,原来的 npm 手装与源码安装顺延为方式二、
方式三,内容不变。

顺带把开头那句「需要已装好 dsh-onebot-qq」改成可选——生活关怀层不依赖
QQ 通道,只想要健康记录/常用坐标/高德瑞幸的人不用装它。
@modusensus
modusensus merged commit 0fbf06a into main Nov 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant