create-linkdesk-plugin 0.1.10 → 0.1.11

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.11",
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",