You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/07/27 03:16:07 UTC

[incubator-inlong-website] branch master updated: [INLONG-802] add developer guide for website (#115)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong-website.git


The following commit(s) were added to refs/heads/master by this push:
     new d50cdec  [INLONG-802] add developer guide for website (#115)
d50cdec is described below

commit d50cdec4af9036fdd0b812a00d8240c3bbc9381b
Author: dockerzhang <do...@apache.org>
AuthorDate: Tue Jul 27 11:15:58 2021 +0800

    [INLONG-802] add developer guide for website (#115)
    
    Co-authored-by: dockerzhang <do...@tencent.com>
---
 docs/en-us/modules/website/quick_start.md | 41 +++++++++++++++++++++++++++++-
 docs/en-us/quick_start.md                 |  4 +--
 docs/zh-cn/modules/website/quick_start.md | 42 ++++++++++++++++++++++++++++++-
 docs/zh-cn/quick_start.md                 |  2 +-
 site_config/docs.js                       | 20 ++++++++++++++-
 5 files changed, 103 insertions(+), 6 deletions(-)

diff --git a/docs/en-us/modules/website/quick_start.md b/docs/en-us/modules/website/quick_start.md
index 6f91991..74d9f78 100644
--- a/docs/en-us/modules/website/quick_start.md
+++ b/docs/en-us/modules/website/quick_start.md
@@ -9,4 +9,43 @@ mvn package -DskipTests -Pdocker -pl inlong-website
 ## Run
 ```
 docker run -d --name website -e MANAGER_API_ADDRESS=127.0.0.1:8083 -p 80:80 inlong/website
-```
\ No newline at end of file
+```
+
+## Guide For Developer
+You should check that `nodejs >= 12.0` is installed.
+
+In the project, you can run some built-in commands:
+
+If `node_modules` is not installed, you should first run `npm install` or `yarn install`.
+
+Use `npm run dev` or `yarn dev` to run the application in development mode.
+
+If the server runs successfully, the browser will open [http://localhost:8080](http://localhost:8080) to view in the browser.
+
+If you edit, the page will reload.
+You will also see any lint errors in the console.
+
+The start of the web server depends on the back-end server `manger api` interface.
+
+You should start the backend server first, and then set the variable `target` in `/inlong-website/src/setupProxy.js` to the address of the api service.
+
+### Test
+
+Run `npm test` or `yarn test`
+
+Start the test runner in interactive observation mode.
+For more information, see the section on [Running Tests](https://create-react-app.dev/docs/running-tests/).
+
+### Build
+
+First, make sure that the project has run `npm install` or `yarn install` to install `node_modules`.
+
+Run `npm run build` or `yarn build`.
+
+Build the application for production into the build folder.
+Better page performance can be obtained in the constructed production mode.
+
+After the build, the code is compressed, and the file name includes the hash value.
+Your application is ready to be deployed!
+
+For details, see the section on [deployment](https://create-react-app.dev/docs/deployment/).
\ No newline at end of file
diff --git a/docs/en-us/quick_start.md b/docs/en-us/quick_start.md
index f9f83cc..2eb7044 100644
--- a/docs/en-us/quick_start.md
+++ b/docs/en-us/quick_start.md
@@ -51,8 +51,8 @@ inlong-website
 ## deploy InLong Manager
 [deploy InLong Manager](modules/manager/quick_start.md)
 
-## deploy InLong Web
-[deploy InLong Web](modules/website/quick_start.md)
+## deploy InLong WebSite
+[deploy InLong WebSite](modules/website/quick_start.md)
 
 ## deploy InLong Sort
 [deploy InLong Sort](modules/sort/quick_start.md)
diff --git a/docs/zh-cn/modules/website/quick_start.md b/docs/zh-cn/modules/website/quick_start.md
index 4637124..a056991 100644
--- a/docs/zh-cn/modules/website/quick_start.md
+++ b/docs/zh-cn/modules/website/quick_start.md
@@ -9,4 +9,44 @@ mvn package -DskipTests -Pdocker -pl inlong-website
 ## 运行
 ```
 docker run -d --name website -e MANAGER_API_ADDRESS=127.0.0.1:8083 -p 80:80 inlong/website
-```
\ No newline at end of file
+```
+
+## 开发指引
+
+确认 `nodejs >= 12.0` 已经安装。
+
+在新创建的项目中,您可以运行一些内置命令:
+
+如果没有安装 `node_modules`,你应该首先运行 `npm install` 或 `yarn install`。
+
+使用 `npm run dev` 或 `yarn dev` 在开发模式下运行应用程序。
+
+如果服务器运行成功,浏览器将打开 [http://localhost:8080](http://localhost:8080) 在浏览器中查看。
+
+如果您进行编辑,页面将重新加载。
+您还将在控制台中看到任何 lint 错误。
+
+web服务器的启动依赖于后端服务 `manger api` 接口。
+
+您应该先启动后端服务器,然后将 `/inlong-website/src/setupProxy.js` 中的变量`target` 设置为api服务的地址。
+
+### 测试
+
+运行 `npm test` 或 `yarn test`
+
+在交互式观察模式下启动测试运行器。
+有关更多信息,请参阅有关 [运行测试](https://create-react-app.dev/docs/running-tests/) 的部分。
+
+### 构建
+
+首先保证项目已运行过 `npm install` 或 `yarn install` 安装了 `node_modules`。
+
+运行 `npm run build` 或 `yarn build`。
+
+将用于生产的应用程序构建到构建文件夹。
+在构建后的生产模式下可以获得较好的页面性能。
+
+构建后代码被压缩,文件名包括哈希值。
+您的应用程序已准备好部署!
+
+有关详细信息,请参阅有关 [deployment](https://create-react-app.dev/docs/deployment/) 的部分。
\ No newline at end of file
diff --git a/docs/zh-cn/quick_start.md b/docs/zh-cn/quick_start.md
index 247ccdb..64323d3 100644
--- a/docs/zh-cn/quick_start.md
+++ b/docs/zh-cn/quick_start.md
@@ -51,7 +51,7 @@ inlong-website
 [部署InLong Manager](modules/manager/quick_start.md)
 
 ## 部署InLong WebSite
-[部署InLong Web](modules/website/quick_start.md)
+[部署InLong WebSite](modules/website/quick_start.md)
 
 ## 部署部署InLong Sort
 [部署InLong Sort](modules/sort/quick_start.md)
diff --git a/site_config/docs.js b/site_config/docs.js
index f7a00aa..a80c21a 100644
--- a/site_config/docs.js
+++ b/site_config/docs.js
@@ -31,6 +31,15 @@ export default {
 			],
           },
           {
+              title: 'WebSite',
+              children: [
+                  {
+                      title: 'Build && Deployment',
+                      link: '/en-us/docs/modules/website/quick_start.html',
+                  },
+              ],
+          },
+          {
             title: 'Agent',
             children: [
                {
@@ -162,8 +171,17 @@ export default {
                  link: '/zh-cn/docs/modules/manager/quick_start.html',
                },
             ],
-          },		
+          },
           {
+              title: 'WebSite',
+              children: [
+                  {
+                      title: '编译部署',
+                      link: '/zh-cn/docs/modules/website/quick_start.html',
+                  },
+              ],
+          },
+        {
             title: 'Agent',
             children: [
                {