@linkdesk/plugin-docs 0.1.45 → 0.1.46
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.
|
@@ -16,13 +16,14 @@ my-plugin/
|
|
|
16
16
|
│ ├── plugin.json ← rewritten clone (contributes.views[].render → views/<View>.bundle.js)
|
|
17
17
|
│ ├── index.bundle.js ← main entry bundle (whenever the loader sees it, it becomes the runtime entry)
|
|
18
18
|
│ ├── index.bundle.css ← aggregated styles
|
|
19
|
-
│ ├── views/<View>.bundle.js ← one
|
|
19
|
+
│ ├── views/<View>.bundle.js ← one build surface per contributes.views[].render
|
|
20
|
+
│ ├── <module>-<hash>.js ← deduped chunk for modules shared across surfaces (each surface imports it relatively)
|
|
20
21
|
│ ├── resources/ icon.svg etc. ← resources ship inside the package
|
|
21
22
|
│ └── (themes/ assets/ i18n/ node_modules/ …) depending on plugin content
|
|
22
23
|
└── src/ … ← author source (does not go into the zip)
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
**Who produces the zip:** [plugin-sdk](https://github.com/Encaron/linkdesk/tree/electron/packages/plugin-sdk) (`npm run publish` goes through the [author journey](https://github.com/Encaron/linkdesk/blob/electron/docs/02-Electron架构/插件生态与发布/05-文档与发布/00-第三方作者旅程.md)) emits `<id>.linkdesk-plugin` + the unpacked directory `dist/<id>.linkdesk-plugin/` at **the project root**. All JS inside the zip is pre-built
|
|
26
|
+
**Who produces the zip:** [plugin-sdk](https://github.com/Encaron/linkdesk/tree/electron/packages/plugin-sdk) (`npm run publish` goes through the [author journey](https://github.com/Encaron/linkdesk/blob/electron/docs/02-Electron架构/插件生态与发布/05-文档与发布/00-第三方作者旅程.md)) emits `<id>.linkdesk-plugin` + the unpacked directory `dist/<id>.linkdesk-plugin/` at **the project root**. All JS inside the zip is pre-built (react-family packages are external, provided by the shell; modules shared across surfaces are emitted once as a deduped chunk)—**there is no source compilation in the installed state**.
|
|
26
27
|
|
|
27
28
|
**Why a single file:** the shell loader only accepts pre-built bundles for installed plugins—`plugin-file-service` sees that `index.bundle.js` exists and overwrites the entry to point at it (`resolveEntry`; the bundle entry is always `index.bundle.js`). The zip is "one plugin = one file that can be downloaded, verified, and atomically replaced", and both install/uninstall and marketplace downloads work against it.
|
|
28
29
|
|
package/docs/zh/04-/346/217/222/344/273/266/345/210/206/345/217/221/346/240/274/345/274/217.md
CHANGED
|
@@ -16,13 +16,14 @@ my-plugin/
|
|
|
16
16
|
│ ├── plugin.json ← 改写克隆(contributes.views[].render → views/<View>.bundle.js)
|
|
17
17
|
│ ├── index.bundle.js ← 主入口 bundle(loader 检测其存在即以 bundle 为运行时入口)
|
|
18
18
|
│ ├── index.bundle.css ← 聚合样式
|
|
19
|
-
│ ├── views/<View>.bundle.js ← 每个 contributes.views[].render
|
|
19
|
+
│ ├── views/<View>.bundle.js ← 每个 contributes.views[].render 一个表面(构建产物)
|
|
20
|
+
│ ├── <模块名>-<hash>.js ← 跨表面共享模块的去重 chunk(各表面相对引它;无共享模块则无)
|
|
20
21
|
│ ├── resources/ icon.svg 等 ← 资源随包
|
|
21
22
|
│ └── (themes/ assets/ i18n/ node_modules/ …) 按插件内容
|
|
22
23
|
└── src/ … ← 作者源码(不进 zip)
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
**谁产 zip:** [plugin-sdk](https://github.com/Encaron/linkdesk/tree/electron/packages/plugin-sdk)(`npm run publish` 走 [作者旅程](https://github.com/Encaron/linkdesk/blob/electron/docs/02-Electron架构/插件生态与发布/05-文档与发布/00-第三方作者旅程.md))在**项目根**产 `<id>.linkdesk-plugin` + 解包目录 `dist/<id>.linkdesk-plugin/`。zip 内 JS
|
|
26
|
+
**谁产 zip:** [plugin-sdk](https://github.com/Encaron/linkdesk/tree/electron/packages/plugin-sdk)(`npm run publish` 走 [作者旅程](https://github.com/Encaron/linkdesk/blob/electron/docs/02-Electron架构/插件生态与发布/05-文档与发布/00-第三方作者旅程.md))在**项目根**产 `<id>.linkdesk-plugin` + 解包目录 `dist/<id>.linkdesk-plugin/`。zip 内 JS 全部预构建(react 系 external,壳提供;跨表面共享的模块去掉重 chunk、只存一份)——**安装态没有源码编译**。
|
|
26
27
|
|
|
27
28
|
**为什么是单文件:** 壳 loader 对安装态插件只认预构建 bundle——`plugin-file-service` 检测到 `index.bundle.js` 存在即覆盖 entry 指向它(`resolveEntry`,bundle 入口恒 `index.bundle.js`)。zip 是「一个插件 = 一个可下载/可校验/可原子替换的文件」,装卸与市场下载都对着它。
|
|
28
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkdesk/plugin-docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
4
4
|
"description": "LinkDesk 插件作者文档(离线包)——作者面文档树的发布产物(英文 `docs/03-plugin-authoring` 在包根、中文 `docs/03-插件制造` 在 `zh/`):从零学会做一个插件(导览 / 三档动线 / 区域地图 / 组件速查 / 主题 / API 入口)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|