Repository navigation
docs: 安装说明加上 dsh plugin 一行命令,给插件市场投稿用 - #8
Merged
Merged
Conversation
dsh-plugin.org 的提交模板要求填一条「实际跑通过的安装命令」, 仓库里原来只有 npm install + 手改 bundles 两步。补一条一行命令装完的 路径,放在最前面作为推荐方式,原来的 npm 手装与源码安装顺延为方式二、 方式三,内容不变。 顺带把开头那句「需要已装好 dsh-onebot-qq」改成可选——生活关怀层不依赖 QQ 通道,只想要健康记录/常用坐标/高德瑞幸的人不用装它。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为什么改
要去插件市场投稿,三个市场的硬性要求里有一条本仓库原来不满足:
dsh plugin --profile web add dsh-xxx。dsh.bundlemanifest(this is what makes it installable viadsh plugin add)」——我们有这个 manifest,但 README 里没告诉人可以用那条命令。原来的 README 只有「npm install + 手改 profile 的 package.json 两处登记」这一条路。能用,但对第一次装的人是两道手工活,而且market 的提交表单只认一行命令。
改了什么
README.md的安装节重排:新增的那条:
顺带把开头那句「需要已装好 dsh-onebot-qq」改成可选。这不是文案美化——careGlobal 那版之后生活关怀层本来就不依赖 QQ 通道,只想要健康记录/常用坐标/高德瑞幸的人装 dsh-onebot-qq 是白装。原来的写法会让这类用户直接放弃。
验证
这条命令我在本机真跑过,不是照抄模板:
装完读 profile 的
package.json:dsh.profile.bundles里自动出现了dsh-cura,不需要手改——我原本以为要补一步,实测是插件管理器自己 reconcile 的(dsh-plugin-manager/lib/types/operations.js里bundleManifest()读dsh.bundle.patch后 push 进 bundles 数组)。再验一次显式版本:
八套测试全绿(24241ms),这次只动了 Markdown,测试不受影响。
一个诚实的提醒
dsh plugin add dsh-cura不带版本号时会解析成^<latest>,pnpm 会追加一条minimumReleaseAgeExclude到 profile 的pnpm-workspace.yaml(这次是dsh-cura@0.9.1)。这是 pnpm 11 对新发布包的默认保护,不是我们的问题,但第一次装的人会看到一行提示,别以为是报错。