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

shuai pushed a commit to branch build-community
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git

commit 2f97ad0dea0a90e1d8d47c7aacc9cb18e103a325
Author: shuai <[email protected]>
AuthorDate: Thu Nov 16 15:16:29 2023 +0800

    docs: add frontend development
---
 community/contributing/contributing.md | 29 +++++++++++++++++++++++++++++
 community/contributing/frontend.md     |  4 ++--
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/community/contributing/contributing.md 
b/community/contributing/contributing.md
index b6c0a9a7..b392a963 100644
--- a/community/contributing/contributing.md
+++ b/community/contributing/contributing.md
@@ -49,3 +49,32 @@ The subject contains a succinct description of the change:
 - entire length of the commit message must not go over 50 characters
 - describe what the commit does, not what issue it relates to or fixes
 - be brief, yet descriptive - we should have a good understanding of what the 
commit does by reading the subject
+
+## Development
+
+### Backend
+
+#### Installation
+
+#### Code Conventions
+
+### Frontend
+
+#### Installation
+
+1. Ensure you have [node](https://nodejs.org/en) and 
[pnpm](https://pnpm.io/installation) installed.
+2. After cloning the repository, run the following command. This will install 
all dependencies as well as build all local packages.
+```
+cd ./ui
+pnpm install
+```
+3. To start a development server, run `pnpm start`. now, your browser should 
already open automatically, and autoload `http://localhost:3000`. you can also 
manually visit it.
+4. To switch API, you can modify the `ui/.env.development` file and then 
re-run pnpm start. If you're just using it yourself, we recommend creating a 
`.env.development.local` file that defines the address of the api you're going 
to use.
+
+#### Code Conventions
+
+- **Most important: Look around.** Match the style you see used in the rest of 
the project. This includes formatting, naming files, naming things in code, 
naming things in documentation, etc.
+- We do have Prettier (a formatter) and ESLint (a syntax linter) to catch most 
stylistic problems. If you are working locally, you can run  `pnpm lint` and 
`pnpm prettier` to fix most code formatting.
+- **No runtime errors** Before submitting the code, please ensure that there 
will be no errors when running locally. This will greatly reduce the workload 
of review.
+
+
diff --git a/community/contributing/frontend.md 
b/community/contributing/frontend.md
index 0810d319..2f5b8537 100644
--- a/community/contributing/frontend.md
+++ b/community/contributing/frontend.md
@@ -104,8 +104,8 @@ All our translations are placed in the i18n directory.
 ## 📱Environment Support
 
 | [<img 
src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png";
 alt="Edge" width="24px" height="24px" 
/>](http://godban.github.io/browsers-support-badges/)<br />Edge | [<img 
src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png";
 alt="Firefox" width="24px" height="24px" 
/>](http://godban.github.io/browsers-support-badges/)<br />Firefox | [<img 
src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/ [...]
-| 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 | 
--------------------------------------------------------------------------------
 [...]
-| last 2 versions                                                              
                                                                                
                                            | last 2 versions                   
                                                                                
                                                                                
               | last 2 versions                                                
              [...]
+|-------------|-------------|-------------|-------------|
+| last 2 versions | last 2 versions | last 2 versions | last 2 versions |
 
 ## ⭐ Built with
 - [TypeScript](https://www.typescriptlang.org/) - Strongly typed JavaScript

Reply via email to