create-linkdesk-plugin 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ The generated project has **the same shape as an official plugin** — README /
21
21
  ```
22
22
  my-cool-plugin/
23
23
  ├── plugin.json # plugin manifest (JSONC: comments + trailing commas allowed, sectioned example fields, VS Code $schema validation)
24
- ├── package.json # scripts: dev / dev:real / build / publish / validate / lint / verify / test
24
+ ├── package.json # deps: @linkdesk/ui (resolves the shell's current version line) · scripts: dev / dev:real / build / publish / validate / lint / verify / test
25
25
  ├── tsconfig.json # jsx: react-jsx + window.linkdesk.* types (@linkdesk/plugin-sdk)
26
26
  ├── AGENTS.md # what this project is + the iron rules + where the docs are (for your AI assistant)
27
27
  ├── .gitignore # node_modules / dist / *.linkdesk-plugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-linkdesk-plugin",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "LinkDesk 插件脚手架——`npm create linkdesk-plugin@latest my-cool-plugin` 一行生成你的第一个插件项目(对标 yo code)。",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,7 +28,7 @@ You do not need to pre-create empty folders (git does not track them). **Create
28
28
  | `src/styles/` | **Multiple** CSS files — keep them together here (a single file next to the entry is fine too) | When needed |
29
29
  | `src/__tests__/` | Unit tests (run `npm i -D vitest` yourself if you want them — the scaffold does not preinstall test tooling) | When needed |
30
30
 
31
- > 🔴 **Shared things do not belong here** — components/hooks reused across plugins come from `@linkdesk/ui` (the public package the shell provides). **Do not write a second copy inside your plugin.** Only logic that belongs to this plugin stays local.
31
+ > 🔴 **Shared things do not belong here** — components/hooks reused across plugins come from `@linkdesk/ui` (the public package the shell provides; it is already declared in `package.json` as `"latest"`, which resolves to the shell's current version line when you install — pin it to a specific shell version if you need a floor). The shell supplies that one instance at runtime, so **do not import its css** and **do not write a second copy inside your plugin**. Only logic that belongs to this plugin stays local.
32
32
  > 🔴 **Assets always live in `resources/` — no loose images in the plugin root.** What gets into the install package is what is **referenced by the README** or **declared by `icon` / `marketIcon`**; the directory name itself has no magic.
33
33
 
34
34
  ## Three rules for this plugin
@@ -4,6 +4,9 @@
4
4
  "private": true,
5
5
  "description": "{{displayName}}——LinkDesk 插件(由 create-linkdesk-plugin 生成)",
6
6
  "type": "module",
7
+ "dependencies": {
8
+ "@linkdesk/ui": "latest"
9
+ },
7
10
  "scripts": {
8
11
  "dev": "linkdesk-plugin-sdk dev",
9
12
  "dev:real": "linkdesk-plugin-sdk dev --real",
@@ -16,6 +16,10 @@
16
16
  "pluginId": "{{pluginName}}",
17
17
  "name": "{{displayName}}", // 显示名——标签页 / 插件详情等 UI 出现处
18
18
  "version": "0.1.0", // 语义化版本 x.y.z——市场更新比较靠它;+1 时务必同笔补 CHANGELOG.md 的新段
19
+ // ── 最低壳版本──
20
+ // 模板消费 @linkdesk/ui(组件由壳池 vendor 单实例供给)⇒ 必须声明 ≥ 重锚号 0.2.13:低于它的旧壳
21
+ // 没有组件可解析,装上即视图全崩。SDK lint 腿(check-ui-min-app-version)机械把关,漏声明判红。
22
+ "minAppVersion": "0.2.13",
19
23
  "description": "{{displayName}}——我的第一个 LinkDesk 插件", // 一句话描述(插件详情页展示)
20
24
  "author": "{{author}}", // 作者名
21
25
  "icon": "resources/icon.svg", // 图标——图标栏 / 标签页 / 市场里显示的就是它(resources/icon.svg 是占位图,换成你的)