Commit 36632411cc038c4dae0b19e54fcf1fd0c9807e2c

Authored by ly525
1 parent 08b74da5

docs(quick-start): add quick start for users familiar with node tech stack

docs/en/getting-started/quick-start.md
1 # Quick Start 1 # Quick Start
2 2
3 -# commands commonly used for local dev 3 +
  4 +> if you are familiar with `Node`, `Yarn`(and already installed), please follow the commands to start quickly:
  5 +
  6 +> if you are not familiar with the tech stack, please read the following detailed tutorial
  7 +
4 ```bash 8 ```bash
5 -npm run dev # dev back-end or docs  
6 -yarn serve # dev front-end  
7 -``` 9 +cd back-end/h5-api && yarn && yarn dev
8 10
  11 +# open a new terminal and goto the project root path
  12 +
  13 +cd front-end/h5 && yarn && yarn engine:build && yarn dev
  14 +```
9 15
10 # Overview 16 # Overview
11 17
@@ -76,10 +82,7 @@ error TypeError: ctx.render is not a function @@ -76,10 +82,7 @@ error TypeError: ctx.render is not a function
76 ### 1. quick start 82 ### 1. quick start
77 ```bash 83 ```bash
78 # by default, the current path is the root path of luban-h5 84 # by default, the current path is the root path of luban-h5
79 -cd front-end/h5  
80 -  
81 -yarn # install dependencies  
82 -yarn serve # develop 85 +cd front-end/h5 && yarn && yarn engine:build && yarn dev
83 86
84 # more commands 87 # more commands
85 # please refer to project/front-end/h5/package.json 88 # please refer to project/front-end/h5/package.json
docs/zh/getting-started/quick-start.md
@@ -3,6 +3,17 @@ @@ -3,6 +3,17 @@
3 3
4 > 欢迎大家到[鲁班H5-社区](https://support.qq.com/products/93432/) 交流,在这里可以提问、反馈意见和建议,与作者直接交流 4 > 欢迎大家到[鲁班H5-社区](https://support.qq.com/products/93432/) 交流,在这里可以提问、反馈意见和建议,与作者直接交流
5 5
  6 +> 如果您已经熟悉并已经安装了 `Node`、`Yarn`,可以直接参照下面的命令,快速上手
  7 +
  8 +> 如果您不熟悉,请阅读下面的详细教程
  9 +
  10 +```bash
  11 +cd back-end/h5-api && yarn && yarn dev
  12 +
  13 +# 新开一个终端,回到项目根目录
  14 +cd front-end/h5 && yarn && yarn engine:build && yarn dev
  15 +```
  16 +
6 # 常见问题 17 # 常见问题
7 > 这部分一般是按照下面的教程运行之后,仍然可能、也许会遇到的问题 18 > 这部分一般是按照下面的教程运行之后,仍然可能、也许会遇到的问题
8 19
@@ -63,6 +74,7 @@ yarn config set registry https://registry.npm.taobao.org @@ -63,6 +74,7 @@ yarn config set registry https://registry.npm.taobao.org
63 1. 后端部分文档会尽量和 `[github-后端部分文档说明(project/back-end/h5-api/README.md)](https://github.com/ly525/luban-h5/blob/dev/back-end/h5-api/README.md)`保持同步 74 1. 后端部分文档会尽量和 `[github-后端部分文档说明(project/back-end/h5-api/README.md)](https://github.com/ly525/luban-h5/blob/dev/back-end/h5-api/README.md)`保持同步
64 75
65 ## 后端环境搭建 76 ## 后端环境搭建
  77 +> 如果遇到接口 403 问题,请看:`2. 注意事项`
66 ### 1. 快速上手 78 ### 1. 快速上手
67 79
68 ```bash 80 ```bash
@@ -72,7 +84,7 @@ cd back-end/h5-api @@ -72,7 +84,7 @@ cd back-end/h5-api
72 # 原因参见:https://github.com/ly525/luban-h5/issues/92 84 # 原因参见:https://github.com/ly525/luban-h5/issues/92
73 yarn install # 安装依赖 85 yarn install # 安装依赖
74 86
75 -npm run dev 87 +yarn dev
76 # 补充说明: 如果需要在 vscode 中进行debug ,请使用 npm run localdev 88 # 补充说明: 如果需要在 vscode 中进行debug ,请使用 npm run localdev
77 89
78 # #!en: default database is sqlite3(h5-api/.tmp/data.db) 90 # #!en: default database is sqlite3(h5-api/.tmp/data.db)
@@ -108,10 +120,7 @@ error TypeError: ctx.render is not a function @@ -108,10 +120,7 @@ error TypeError: ctx.render is not a function
108 120
109 ```bash 121 ```bash
110 # 默认当前位置目录为 luban-h5 项目的根目录 122 # 默认当前位置目录为 luban-h5 项目的根目录
111 -cd front-end/h5  
112 -  
113 -yarn # install dependencies  
114 -yarn serve # develop 123 +cd front-end/h5 && yarn && yarn engine:build && yarn dev
115 124
116 # 更多命令 125 # 更多命令
117 请参见 project/front-end/h5/package.json 126 请参见 project/front-end/h5/package.json
front-end/h5/package.json
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 "version": "0.0.0", 3 "version": "0.0.0",
4 "private": true, 4 "private": true,
5 "scripts": { 5 "scripts": {
  6 + "dev": "vue-cli-service serve",
6 "serve": "vue-cli-service serve", 7 "serve": "vue-cli-service serve",
7 "build": "vue-cli-service build", 8 "build": "vue-cli-service build",
8 "lint": "vue-cli-service lint --fix", 9 "lint": "vue-cli-service lint --fix",