File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ # 环境准备
3
+
4
+ ## 安装 Node
5
+
6
+ ` Node.js ` 支持 >= 0.10.29, 建议安装 >= 0.12.0
7
+
8
+ #### osx, linux 环境
9
+
10
+ ``` bash
11
+ $ git clone
[email protected] :creationix/nvm.git
~ /.nvm
12
+ $ source ~ /.nvm/nvm.sh
13
+ # 安装
14
+ $ nvm install v0.12.0
15
+ # 显示当前本地安装的所有 Node.js
16
+ $ nvm ls
17
+ # 显示服务器所有可用的 Node.js
18
+ $ nvm ls-remote
19
+ # 本地可用的 Node.js 中使用 0.12.0
20
+ $ nvm use 0.12.0
21
+ # 设置每次启动默认版本
22
+ $ nvm alias default 0.12.0
23
+ ```
24
+
25
+ ### window 环境
26
+
27
+ 这里假设大家都使用 ` d:\git ` 目录存放 git 项目。
28
+
29
+ ``` bash
30
+ $ d:
31
+ $ cd git
32
+ $ git clone
[email protected] :nanjingboy/nvmw.git
33
+ # 设置 d:\git\nvmw 墓道到 PATH 环境变量
34
+ $ set " PATH=d:\git\nvmw;%PATH%"
35
+ # 安装
36
+ $ nvmw install 0.12.0
37
+ # 显示当前本地安装的所有 Node.js
38
+ $ nvmw ls
39
+ # 显示服务器所有可用的 Node.js
40
+ $ nvmw ls-remote
41
+ # 本地可用的 Node.js 中使用 0.12.0
42
+ $ nvmw use 0.12.0
43
+ # 设置每次启动默认版本
44
+ $ nvmw switch 0.12.0
45
+ ```
46
+
47
+ ## 安装 SPM
48
+
49
+ ``` bash
50
+ $ npm i spm -g
51
+ ```
52
+
53
+ 如遇因网速原因导致的安装失败,可尝试使用 [ cnpm] ( http://cnpmjs.org/ ) 的源加速安装。
54
+
55
+ ``` bash
56
+ $ npm i spm -g -r http://r.cnpmjs.org/
57
+ ```
58
+
You can’t perform that action at this time.
0 commit comments