Commit 6c9d44b1ec8cfed2ea74a87de0adc802a18e646b

Authored by ly525
1 parent 1f549908

docs(quick-start): update engine:build to build:engine

deploy/ubuntu-install.sh
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 # @Author: ly525 5 # @Author: ly525
6 # @Date: 2019-11-30 13:24:57 6 # @Date: 2019-11-30 13:24:57
7 # @LastEditors : ly525 7 # @LastEditors : ly525
8 - # @LastEditTime : 2020-01-05 16:22:19 8 + # @LastEditTime : 2020-01-05 21:39:42
9 # @FilePath: /luban-h5/deploy/ubuntu-install.sh 9 # @FilePath: /luban-h5/deploy/ubuntu-install.sh
10 # @Github: https://github.com/ly525/luban-h5 10 # @Github: https://github.com/ly525/luban-h5
11 # @Description: 11 # @Description:
@@ -331,14 +331,12 @@ function install_luban-h5 { @@ -331,14 +331,12 @@ function install_luban-h5 {
331 git clone https://github.com/ly525/luban-h5 331 git clone https://github.com/ly525/luban-h5
332 332
333 # 鲁班前端 333 # 鲁班前端
334 - cd luban-h5/front-end/h5 && yarn && yarn build && yarn engine:build 334 + cd luban-h5/front-end/h5 && yarn && yarn build # build editor and preview engine
335 335
336 cd - 336 cd -
337 337
338 # 鲁班后端 338 # 鲁班后端
339 - cd luban-h5/back-end/h5-api/  
340 - yarn  
341 - yarn build # build strapi admin 339 + cd luban-h5/back-end/h5-api/ && yarn && yarn build # build strapi admin
342 pm2 start server.js 340 pm2 start server.js
343 pwd 341 pwd
344 success luban-h5 342 success luban-h5
docs/en/getting-started/quick-start.md
@@ -10,7 +10,7 @@ cd back-end/h5-api && yarn && yarn dev @@ -10,7 +10,7 @@ cd back-end/h5-api && yarn && yarn dev
10 10
11 # open a new terminal and goto the project root path 11 # open a new terminal and goto the project root path
12 12
13 -cd front-end/h5 && yarn && yarn engine:build && yarn dev 13 +cd front-end/h5 && yarn && yarn build:engine && yarn dev
14 ``` 14 ```
15 15
16 # Overview 16 # Overview
@@ -82,7 +82,7 @@ error TypeError: ctx.render is not a function @@ -82,7 +82,7 @@ error TypeError: ctx.render is not a function
82 ### 1. quick start 82 ### 1. quick start
83 ```bash 83 ```bash
84 # 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
85 -cd front-end/h5 && yarn && yarn engine:build && yarn dev 85 +cd front-end/h5 && yarn && yarn build:engine && yarn dev
86 86
87 # more commands 87 # more commands
88 # please refer to project/front-end/h5/package.json 88 # please refer to project/front-end/h5/package.json
@@ -102,7 +102,7 @@ previewOne: async (ctx) => { @@ -102,7 +102,7 @@ previewOne: async (ctx) => {
102 ``` 102 ```
103 103
104 #### How to build preview engine 104 #### How to build preview engine
105 -1. cd `front-end/h5`, run `yarn engine:build` 105 +1. cd `front-end/h5`, run `yarn build:engine`
106 2. after build finished, an folder named `engine-assets` is auto generated at `back-end/h5-api/public` 106 2. after build finished, an folder named `engine-assets` is auto generated at `back-end/h5-api/public`
107 3. `preview.vue` is preview modal, the mobile div is an iframe which a wrapper for builded `engine-entry`, learn more about engine here: `luban-h5/front-end/h5/vue.config.js` 107 3. `preview.vue` is preview modal, the mobile div is an iframe which a wrapper for builded `engine-entry`, learn more about engine here: `luban-h5/front-end/h5/vue.config.js`
108 108
docs/zh/getting-started/quick-start.md
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 cd back-end/h5-api && yarn && yarn dev 11 cd back-end/h5-api && yarn && yarn dev
12 12
13 # 新开一个终端,回到项目根目录 13 # 新开一个终端,回到项目根目录
14 -cd front-end/h5 && yarn && yarn engine:build && yarn dev 14 +cd front-end/h5 && yarn && yarn build:engine && yarn dev
15 ``` 15 ```
16 16
17 # 常见问题 17 # 常见问题
@@ -120,7 +120,7 @@ error TypeError: ctx.render is not a function @@ -120,7 +120,7 @@ error TypeError: ctx.render is not a function
120 120
121 ```bash 121 ```bash
122 # 默认当前位置目录为 luban-h5 项目的根目录 122 # 默认当前位置目录为 luban-h5 项目的根目录
123 -cd front-end/h5 && yarn && yarn engine:build && yarn dev 123 +cd front-end/h5 && yarn && yarn build:engine && yarn dev
124 124
125 # 更多命令 125 # 更多命令
126 请参见 project/front-end/h5/package.json 126 请参见 project/front-end/h5/package.json
@@ -139,7 +139,7 @@ previewOne: async (ctx) => { @@ -139,7 +139,7 @@ previewOne: async (ctx) => {
139 }, 139 },
140 ``` 140 ```
141 #### 如何构建 141 #### 如何构建
142 -1. 在`front-end/h5`目录下,运行:`yarn engine:build` 142 +1. 在`front-end/h5`目录下,运行:`yarn build:engine`
143 2. 构建完成之后,后端的`h5-api/public`里面会多一个文件夹 `engine-assets` 143 2. 构建完成之后,后端的`h5-api/public`里面会多一个文件夹 `engine-assets`
144 3. 打开的预览窗口`preview.vue`, 里面的预览部分对应的其实是一个 iframe,可以看看对应的源码 144 3. 打开的预览窗口`preview.vue`, 里面的预览部分对应的其实是一个 iframe,可以看看对应的源码
145 也就是说,这个预览其实依赖后端的渲染引擎,比如 ejs 或者 jade 这种模板引擎,所以参照这里:`luban-h5/front-end/h5/vue.config.js` `engineOutputDir` 变量,preview engine 构建完成,会生成到后端的 `back-end/h5-api/public/engine-assets` 目录 145 也就是说,这个预览其实依赖后端的渲染引擎,比如 ejs 或者 jade 这种模板引擎,所以参照这里:`luban-h5/front-end/h5/vue.config.js` `engineOutputDir` 变量,preview engine 构建完成,会生成到后端的 `back-end/h5-api/public/engine-assets` 目录