File tree Expand file tree Collapse file tree 4 files changed +7316
-7
lines changed Expand file tree Collapse file tree 4 files changed +7316
-7
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,14 @@ install:
1616 - npm install gitbook-cli -g
1717 # 安装 gitbook 插件
1818 - gitbook install
19+ # npm -g 是全局安装, 下面的npm install是安装在项目的node_modules中,这两种构建不冲突
20+ - npm install
1921
2022# 构建脚本
2123script :
2224 - gitbook build
25+ # 不冲突
26+ - npm run build
2327
2428# 分支白名单
2529branches :
Original file line number Diff line number Diff line change 1010
1111## 前置条件
1212
13- 您的系统上需要安装好 node。
13+ 您的系统上需要安装好 node (会自带npm) 。
1414
15- ## 使用 make 命令
15+ ## 使用 make 或者使用 npm 命令去构建
16+
17+ ### 使用 make 命令的方式构建:
1618
1719若您可使用 make 命令,简单执行如下命令进行初始化:
1820
@@ -26,19 +28,20 @@ make init
2628make run
2729```
2830
29- ## 使用 gitbook 命令
31+ ### 使用 npm 命令的方式构建:
32+
33+ 若您不能使用 make 命令,或想直接使用 npm 命令,执行如下命令进行初始化:
3034
31- 若您不能使用 make 命令,或想直接使用 gitbook 命令,执行如下命令进行初始化 :
35+ 安装项目依赖 :
3236
3337``` console
34- npm i -g gitbook-cli #可能需要sudo
35- gitbook install
38+ npm install
3639```
3740
3841执行如下命令运行服务端:
3942
4043``` console
41- gitbook serve
44+ npm run serve
4245```
4346
4447## 访问
You can’t perform that action at this time.
0 commit comments