Skip to content

Commit acd2d94

Browse files
authored
预备环境
1 parent dff2bfd commit acd2d94

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

README.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,37 @@
1-
# react-ts-tutorial
1+
# 环境预备
2+
3+
1. 在本机安装 node : https://nodejs.org
4+
2. 在本机安装 Visual Studio Code : https://code.visualstudio.com/
5+
3. 在本机安装 git: https://git-scm.com/downloads
6+
4. 在本机安装 python: https://www.python.org/downloads/
7+
8+
### 检查基本环境
9+
打开 Terminal (Mac, Linux) 或者 Commnad Line (win)
10+
11+
1. 运行 `node -v` 应该看到输出 `v8.xxx`
12+
2. 运行 `npm -v` 应该看到输出 `6.x.x`
13+
3. 运行 `git --version` 应该看到输出 `git version 2.17.1`
14+
15+
# 安装 NPM 依赖
16+
17+
1. Typescript: `npm i typescript -g`
18+
2. TS-Node: `npm i ts-node ts-node-dev -g`
19+
3. Node-Sass: `npm i node-sass-chokidar -g` (这一步安装需要较长时间)
20+
4. Yarn: `npm i yarn -g`
21+
22+
### 检查 NPM 依赖
23+
24+
1. 运行 `tsc -v` 应该看到输出 `Version 3.0.1`
25+
2. 运行 `yarn -v` 应该看到输出 `1.9.4`
26+
3. 运行 `ts-node -v` 应该看到 node, typescript 等版本号
27+
4. 运行 `ts-node-dev` 应该看到 `Usage: ts-node-dev [options] script [arguments]`
28+
29+
# 预备源代码目录
30+
创建课程目录,运行 `git clone https://github.com/naivefun/react-ts-tutorial.git`
31+
32+
### 试运行
33+
1. `cd react-ts-tutorial`
34+
2. `yarn`
35+
3. `yarn start`
36+
37+
等待编译结束应该会自动弹出主页,否则可以手动输入 `http://localhost:3000` 访问

0 commit comments

Comments
 (0)