Skip to content

Commit d64fdaf

Browse files
committed
增加pnpm 命令
1 parent 7e900a2 commit d64fdaf

File tree

5 files changed

+20
-1
lines changed

5 files changed

+20
-1
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"simple-git": "^3.24.0",
2727
"vuepress": "^1.9.10",
2828
"vuepress-plugin-autometa": "^0.1.13",
29+
"vuepress-plugin-code-copy": "^1.0.6",
2930
"vuepress-plugin-go-top": "^1.0.4",
3031
"vuepress-plugin-sitemap": "^2.3.1"
3132
}

text/.vuepress/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ module.exports = {
6767
'@vuepress/active-header-links': {},
6868
'@vuepress/back-to-top': {},
6969
'@vuepress/nprogress': {},
70+
'vuepress-plugin-code-copy': {
71+
align: 'bottom',
72+
},
7073
// 'vuepress-plugin-nuggets-style-copy': {},
7174
'@whyun/vuepress-plugin-pdf-export': {
7275
puppeteerLaunchOptions: {

text/.vuepress/styles/index.styl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.giscus {
22
max-width: 740px;
33
margin: 0 auto;
4-
}
4+
}

text/04_node_npm.md

+10
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@ packages:
294294
**代码 4.6.1**
295295
296296
pnpm 没有自己专有的 npm 仓库地址设置,而是借用了 npm 的仓库地址,所以你可以直接复用 **命令 4.2.3** 和 **代码 4.3.1** 两种方式来设置 pnpm 仓库地址。
297+
如果想更改 pnpm 下载文件的存放位置,可以使用如下命令:
298+
```
299+
pnpm config set store-dir d:\.pnpm-store
300+
```
301+
**命令 4.6.1**
302+
同时需要留意的是,pnpm 全局安装命令前必须得设置 `global-dir` 属性,否则会提示 global-dir 不存在,不让安装。具体设置命令如下:
303+
```
304+
pnpm config set global-dir D:\pnpm
305+
```
306+
**命令 4.6.2**
297307
### 4.7 发布自己的包到 npmjs
298308

299309
刚才演示了这么命令都是安装别人的包,现在我们自己开发一个包。首先你要注册一个npmjs的账号(注册地址:https://www.npmjs.com/signup )。注册完成后,通过`npm adduser`命令来将注册的账号绑定到本地机器上,运行完改命令后会让你输入 npmjs 的注册账号和密码。

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -8964,6 +8964,11 @@ vuepress-plugin-autometa@^0.1.13:
89648964
remove-markdown "0.3.0"
89658965
striptags "3.1.1"
89668966

8967+
vuepress-plugin-code-copy@^1.0.6:
8968+
version "1.0.6"
8969+
resolved "https://registry.npmmirror.com/vuepress-plugin-code-copy/-/vuepress-plugin-code-copy-1.0.6.tgz#6431dab764b48b5b203e4936d98b1943651ce4ad"
8970+
integrity sha512-FiqwMtlb4rEsOI56O6sSkekcd3SlESxbkR2IaTIQxsMOMoalKfW5R9WlR1Pjm10v6jmU661Ex8MR11k9IzrNUg==
8971+
89678972
vuepress-plugin-container@^2.0.2:
89688973
version "2.1.5"
89698974
resolved "https://registry.npmmirror.com/vuepress-plugin-container/-/vuepress-plugin-container-2.1.5.tgz#37fff05662fedbd63ffd3a5463b2592c7a7f3133"

0 commit comments

Comments
 (0)