dsh-copy-toast 0.6.0 → 0.6.1
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/CHANGELOG.md +5 -0
- package/README.md +26 -3
- package/lib/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
- README 的「安装」改成两条路:从 npm 装(`pnpm add dsh-copy-toast` + 把包名写进 `dsh.profile.bundles`)与从源码目录装(`tools/register.mjs` + `tools/link.mjs`)。`tools/` 不进 npm 包,所以之前的说明对 npm 安装者是空的。
|
|
6
|
+
- 补上全局提示的前提说明:需要本机有 Electron(DSH 桌面版自带),否则只剩窗口内提示。
|
|
7
|
+
|
|
3
8
|
## 0.6.0
|
|
4
9
|
|
|
5
10
|
- package.json 的 files 补上 runtime 与 assets:之前只打包 lib,即使发布到 npm 也会缺 Electron 副窗(runtime/electron-helper/)与立绘素材,全局提示会直接失效。
|
package/README.md
CHANGED
|
@@ -23,16 +23,39 @@
|
|
|
23
23
|
|
|
24
24
|
## 安装
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
### 从 npm 装(推荐)
|
|
27
|
+
|
|
28
|
+
插件已发布到公共 registry:<https://www.npmjs.com/package/dsh-copy-toast>(现行版本 0.6.0)。在 profile 目录里装:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cd ~/.dsh/profiles/desktop
|
|
32
|
+
pnpm add dsh-copy-toast
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
再把包名加进同一个 `package.json` 的 `dsh.profile.bundles` 数组:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"dsh": { "profile": { "bundles": ["...已有项", "dsh-copy-toast"] } }
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
重启 DSH(关掉窗口再打开)即生效。若启动时提示缺模块,再在 profile 目录跑一次 `pnpm install`。
|
|
44
|
+
|
|
45
|
+
### 从源码目录装
|
|
46
|
+
|
|
47
|
+
把本仓库放进 `plugins/dsh-copy-toast`,然后:
|
|
27
48
|
|
|
28
49
|
```bash
|
|
29
50
|
node tools/register.mjs # 写入 profile 的 dependencies 与 bundles
|
|
30
51
|
node tools/link.mjs # 在 profile 的 node_modules 里建 junction
|
|
31
52
|
```
|
|
32
53
|
|
|
33
|
-
|
|
54
|
+
`tools/` 不进 npm 包,只有源码目录里才有这两个脚本。
|
|
55
|
+
|
|
56
|
+
### 全局提示的前提
|
|
34
57
|
|
|
35
|
-
|
|
58
|
+
全局提示(整个电脑)需要本机有 Electron。DSH 桌面版自带一份(`~/.dsh/electron/electron.exe`),装了 DSH 桌面版就不用额外准备;也可以用环境变量 `DSH_COPY_TOAST_ELECTRON` 指定别的可执行文件。没有 Electron 时插件仍可用,只是只剩 DSH 窗口内的提示。
|
|
36
59
|
|
|
37
60
|
## 开关
|
|
38
61
|
|
package/lib/client.js
CHANGED
|
@@ -804,7 +804,7 @@ window.__ModuleLoader__.load({
|
|
|
804
804
|
setEnabled: (value) => setEnabled(value),
|
|
805
805
|
isGlobalEnabled: () => globalEnabled,
|
|
806
806
|
setGlobalEnabled: (value) => setGlobalEnabled(value),
|
|
807
|
-
version: '0.6.
|
|
807
|
+
version: '0.6.1',
|
|
808
808
|
}
|
|
809
809
|
} catch (e) {
|
|
810
810
|
/* ignore */
|
package/lib/index.js
CHANGED