Browse Source

:bug: add npm China mirror & homeage

Jeremy Zheng 3 years ago
parent
commit
5464d592e9
2 changed files with 16 additions and 1 deletions
  1. 1 0
      dashboard/package.json
  2. 15 1
      documents/development/frontend/README.md

+ 1 - 0
dashboard/package.json

@@ -1,6 +1,7 @@
 {
   "name": "dashboard",
   "version": "0.1.0",
+  "homepage": "/my",
   "private": true,
   "dependencies": {
     "@ant-design/pro-components": "^2.3.13",

+ 15 - 1
documents/development/frontend/README.md

@@ -2,13 +2,27 @@
 
 ## 安装依赖包
 
+### offline
+
 ```bash
 # offline
 tar xf node_modules.tar.xz
-# online
+```
+
+### online
+
+```bash
+yarn config set registry 'https://registry.npmmirror.com/' --global # for China users
 yarn install
 ```
 
+- for windows user, download [Node.js](https://nodejs.org/en/download/current/) and then,
+
+  ```bash
+  npm config set registry 'https://registry.npmmirror.com/' --global # for China user
+  npm install -g yarn
+  ```
+
 ![dashboard.png](dashboard.png)
 
 ## 开发模式启动 [dashboard](http://localhost:3000)