pnpm-link 1.0.0 → 1.0.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/README.md +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- 支持全局已 link 的包名写入依赖
|
|
8
8
|
- 支持本地相对路径包写入依赖
|
|
9
9
|
- 默认在当前执行目录下查找 `package.json`
|
|
10
|
-
- 支持 `file:` 与 `link:`
|
|
10
|
+
- 支持 `file:` 与 `link:` 两种协议,默认使用 `link:`
|
|
11
11
|
- 支持 `--save-dev` / `--save-prod`,与 npm install 语义一致
|
|
12
12
|
|
|
13
13
|
## 安装
|
|
@@ -39,7 +39,7 @@ pnpm-link ./packages/my-lib --protocol link
|
|
|
39
39
|
|
|
40
40
|
- `-D, --save-dev`:写入 `devDependencies`
|
|
41
41
|
- `-P, --save-prod`:写入 `dependencies`
|
|
42
|
-
- `-p, --protocol <protocol>`:协议类型,可选 `file` 或 `link`,默认 `
|
|
42
|
+
- `-p, --protocol <protocol>`:协议类型,可选 `file` 或 `link`,默认 `link`
|
|
43
43
|
- `-h, --help`:显示帮助
|
|
44
44
|
- `-v, --version`:显示版本
|
|
45
45
|
|
|
@@ -52,8 +52,11 @@ pnpm-link my-package
|
|
|
52
52
|
# 全局包写入 devDependencies
|
|
53
53
|
pnpm-link my-package --save-dev
|
|
54
54
|
|
|
55
|
-
# 本地包写入 dependencies
|
|
56
|
-
pnpm-link ./packages/my-lib
|
|
55
|
+
# 本地包写入 dependencies,默认使用 link 协议
|
|
56
|
+
pnpm-link ./packages/my-lib
|
|
57
|
+
|
|
58
|
+
# 本地包写入 dependencies,显式使用 file 协议
|
|
59
|
+
pnpm-link ./packages/my-lib --protocol file
|
|
57
60
|
```
|
|
58
61
|
|
|
59
62
|
## 实现原理
|