Commit 36632411cc038c4dae0b19e54fcf1fd0c9807e2c
1 parent
08b74da5
docs(quick-start): add quick start for users familiar with node tech stack
Showing
3 changed files
with
26 additions
and
13 deletions
docs/en/getting-started/quick-start.md
| 1 | 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 | 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 | 16 | # Overview |
| 11 | 17 | |
| ... | ... | @@ -76,10 +82,7 @@ error TypeError: ctx.render is not a function |
| 76 | 82 | ### 1. quick start |
| 77 | 83 | ```bash |
| 78 | 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 | 87 | # more commands |
| 85 | 88 | # please refer to project/front-end/h5/package.json | ... | ... |
docs/zh/getting-started/quick-start.md
| ... | ... | @@ -3,6 +3,17 @@ |
| 3 | 3 | |
| 4 | 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 | 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 | 78 | ### 1. 快速上手 |
| 67 | 79 | |
| 68 | 80 | ```bash |
| ... | ... | @@ -72,7 +84,7 @@ cd back-end/h5-api |
| 72 | 84 | # 原因参见:https://github.com/ly525/luban-h5/issues/92 |
| 73 | 85 | yarn install # 安装依赖 |
| 74 | 86 | |
| 75 | -npm run dev | |
| 87 | +yarn dev | |
| 76 | 88 | # 补充说明: 如果需要在 vscode 中进行debug ,请使用 npm run localdev |
| 77 | 89 | |
| 78 | 90 | # #!en: default database is sqlite3(h5-api/.tmp/data.db) |
| ... | ... | @@ -108,10 +120,7 @@ error TypeError: ctx.render is not a function |
| 108 | 120 | |
| 109 | 121 | ```bash |
| 110 | 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 | 126 | 请参见 project/front-end/h5/package.json | ... | ... |