Skip to content

Commit 10f2577

Browse files
committed
README.md: update
1 parent feb5313 commit 10f2577

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

README.md

+93
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,53 @@
4646

4747
![Linux](screenshot/Linux.png)
4848

49+
### 如何编译
50+
51+
#### 1. 安装所有依赖
52+
53+
```bash
54+
# 安装必备工具
55+
npm install -g gulp
56+
npm install -g bower
57+
58+
# 自动安装依赖
59+
npm install
60+
bower install
61+
```
62+
63+
#### 2. 更换graceful-fs版本(对于Node `v10.x`及以上版本)
64+
65+
```bash
66+
npm install graceful-fs
67+
68+
# 如果仍出现"ReferenceError: primordials is not defined" 的错误,
69+
# 则删掉cnpm安装的旧版本
70+
rm -rf node_modules/[email protected]@graceful-fs
71+
72+
# 如果某个子模块依赖旧版本graceful-fs,则请根据报错信息,
73+
# 切换到该模块目录下更新。
74+
cd node_modules/<PATH_TO_MODULE_USING_DEPRECATED_GRACEFUL_FS>
75+
npm install [email protected]
76+
```
77+
78+
#### 3. 更换`@types/node`版本
79+
80+
```bash
81+
npm install @types/[email protected]
82+
```
83+
84+
#### 4. 开始编译
85+
86+
```bash
87+
gulp
88+
```
89+
90+
#### 5. 测试运行
91+
92+
```bash
93+
npm run demo
94+
```
95+
4996
### 联系我们
5097

5198
问题和建议反馈:
@@ -113,6 +160,52 @@ Open Document Node, Inspiration Unfold</p>
113160

114161
![Linux](screenshot/Linux.png)
115162

163+
### How to compile
164+
165+
#### 1. Install dependencies
166+
167+
```bash
168+
# Install prerequisites
169+
npm install -g gulp
170+
npm install -g bower
171+
172+
# Install dependencies
173+
npm install
174+
bower install
175+
```
176+
177+
#### 2. Change graceful-fs version (For Node `v10.x` or newer)
178+
179+
```bash
180+
npm install graceful-fs
181+
182+
# If error "ReferenceError: primordials is not defined" still occurs, remove the old edition installed by cnpm
183+
rm -rf node_modules/[email protected]@graceful-fs
184+
185+
# If a submodule relies on old graceful-fs, please follow the log, locate to its directory,
186+
# then manually update
187+
cd node_modules/<PATH_TO_MODULE_USING_DEPRECATED_GRACEFUL_FS>
188+
npm install [email protected]
189+
```
190+
191+
#### 3. Change `@types/node` to v12.x
192+
193+
```bash
194+
npm install @types/[email protected]
195+
```
196+
197+
#### 4. Build
198+
199+
```bash
200+
gulp
201+
```
202+
203+
#### 5. Try running
204+
205+
```bash
206+
npm run demo
207+
```
208+
116209
### Contact us
117210

118211
Questions and suggestion feedback:

0 commit comments

Comments
 (0)