Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 1.52 KB

README.md

File metadata and controls

96 lines (63 loc) · 1.52 KB

React-koa-mobx

Features

  1. BaseList 组件类
  2. DetailBase 组件类
  3. FormModal(Form、Step Form、CodeForm)
  4. ...

Developer Guide

Preparation

Make sure the following software is installed and added to the $PATH variable:

Install yarn with npm:

npm install -g yarn

Fork the repository, then clone your repository and install the dependencies:

yarn

Note: If you are in China Mainland, execute the following command before running the command above for faster installation.

yarn config set registry https://registry.npm.taobao.org

Start App

yarn start

Now, you can access http://localhost:8080 to view the app.

Run tests

yarn test

I18n

  1. Mark the text to be translated。examples: t('Name')
  2. Scanner by run the command:
grunt
  1. Add translates in translation.json
{
  "Age": "年龄",
  "Name": "名称",
}
  1. The parameter passed in the t function is a variable, which cannot be scanned automatically and needs to be manually added to /zh/translation.json

Build App for production

The project can be built for production by using the following task:

yarn build

To build and serve from dist, using the following task:

yarn serve

To build App to an image, run the following task after yarn build:

docker build -t console .

Test App image by run:

./docker-run