refactor(plugins): read a bundle's one-liner from the package description only
The dsh manifest gains no description field: a bundle's card shows the package.json description, and the shipped optional bundles carry no display title or description of their own until localized metadata is designed. The plugin author tutorial shows the bundle declaration alone.
This commit is contained in:
1 parent
fa320209ab
commit
79729c3422
18 files changed
+40
-64
No files matched your search
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write docs/user/develop/basic/publish.md
|
||||
publish.md: da3a80a809a2e01b5f5914178a8d34e8c4453fc1
|
||||
publish.zh.md: 3baa952d42c3a223b8ce1aeea326799e10cbe1f5
|
||||
publish.md: 17b0cb80f9cf385773ae9e1f4d7061ec1df9c1a2
|
||||
publish.zh.md: 3cc65af58d34028a6bff03455451153e2c7f439b
|
||||
@@ -39,16 +39,10 @@ Create `hello-plugin/package.json`:
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"files": ["index.js", "cordis.patch.yml"],
|
||||
"dsh": {
|
||||
"title": "Hello plugin",
|
||||
"description": "Logs a greeting when it loads.",
|
||||
"bundle": { "patch": "./cordis.patch.yml" }
|
||||
}
|
||||
"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
|
||||
}
|
||||
```
|
||||
|
||||
`dsh.title` and `dsh.description` are what users see where bundles are listed, such as the Web sidebar's Plugins page; without them the page shows the package name stripped of its scope and `dsh-` prefix, and the package `description`.
|
||||
|
||||
Create `hello-plugin/index.js` with the plugin entry point:
|
||||
|
||||
```js
|
||||
|
||||
@@ -39,16 +39,10 @@ hello-plugin/
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"files": ["index.js", "cordis.patch.yml"],
|
||||
"dsh": {
|
||||
"title": "Hello plugin",
|
||||
"description": "Logs a greeting when it loads.",
|
||||
"bundle": { "patch": "./cordis.patch.yml" }
|
||||
}
|
||||
"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
|
||||
}
|
||||
```
|
||||
|
||||
`dsh.title` 与 `dsh.description` 是用户在组合包列表(例如 Web 侧栏的插件页)里看到的名字和简介;没有它们时,页面显示去掉 scope 和 `dsh-` 前缀的包名,以及包的 `description`。
|
||||
|
||||
创建 `hello-plugin/index.js`,写入插件入口:
|
||||
|
||||
```js
|
||||
|
||||
Reference in new issue
Block a user