Skip to content

Commit dc5cef3

Browse files
author
tangtanglove
committed
Merge branch 'develop'
2 parents b858fda + 30799ea commit dc5cef3

File tree

190 files changed

+8493
-32650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+8493
-32650
lines changed

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/lambda/
2+
/scripts
3+
/config
4+
.history

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
extends: [require.resolve('@umijs/fabric/dist/eslint')],
3+
globals: {
4+
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
5+
page: true,
6+
REACT_APP_ENV: true,
7+
},
8+
};

.gitignore

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,40 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
5-
/npm-debug.log*
6-
/yarn-error.log
7-
/yarn.lock
4+
**/node_modules
5+
# roadhog-api-doc ignore
6+
/src/utils/request-temp.js
7+
_roadhog-api-doc
88

99
# production
1010
/dist
11+
/.vscode
1112

1213
# misc
1314
.DS_Store
15+
npm-debug.log*
16+
yarn-error.log
17+
18+
/coverage
19+
.idea
20+
yarn.lock
21+
package-lock.json
22+
*bak
23+
.vscode
24+
25+
# visual studio code
26+
.history
27+
*.log
28+
functions/*
29+
.temp/**
1430

1531
# umi
16-
/src/.umi
17-
/src/.umi-production
18-
/src/.umi-test
19-
/.env.local
32+
.umi
33+
.umi-production
34+
35+
# screenshot
36+
screenshot
37+
.firebase
38+
.eslintcache
39+
40+
build

.prettierignore

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
**/*.md
21
**/*.svg
3-
**/*.ejs
4-
**/*.html
52
package.json
63
.umi
74
.umi-production
8-
.umi-test
5+
/dist
6+
.dockerignore
7+
.DS_Store
8+
.eslintignore
9+
*.png
10+
*.toml
11+
docker
12+
.editorconfig
13+
Dockerfile*
14+
.gitignore
15+
.prettierignore
16+
LICENSE
17+
.eslintcache
18+
*.lock
19+
yarn-error.log
20+
.history
21+
CNAME
22+
/build

.prettierrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const fabric = require('@umijs/fabric');
2+
3+
module.exports = {
4+
...fabric.prettier,
5+
};

.stylelintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const fabric = require('@umijs/fabric');
2+
3+
module.exports = {
4+
...fabric.stylelint,
5+
};

.umirc.ts

Lines changed: 0 additions & 101 deletions
This file was deleted.

README.md

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,57 @@
1-
# umi project
1+
# Ant Design Pro
22

3-
## Getting Started
3+
This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use.
44

5-
Install dependencies,
5+
## Environment Prepare
6+
7+
Install `node_modules`:
8+
9+
```bash
10+
npm install
11+
```
12+
13+
or
14+
15+
```bash
16+
yarn
17+
```
18+
19+
## Provided Scripts
20+
21+
Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test.
22+
23+
Scripts provided in `package.json`. It's safe to modify or add additional script:
24+
25+
### Start project
26+
27+
```bash
28+
npm start
29+
```
30+
31+
### Build project
32+
33+
```bash
34+
npm run build
35+
```
36+
37+
### Check code style
638

739
```bash
8-
$ yarn
40+
npm run lint
941
```
1042

11-
Start the dev server,
43+
You can also use script to auto fix some lint error:
1244

1345
```bash
14-
$ yarn start
46+
npm run lint:fix
1547
```
48+
49+
### Test code
50+
51+
```bash
52+
npm test
53+
```
54+
55+
## More
56+
57+
You can view full document on our [official website](https://pro.ant.design). And welcome any feedback in our [github](https://github.com/ant-design/ant-design-pro).

config/config.ts

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// https://umijs.org/config/
2+
import { defineConfig } from 'umi';
3+
import defaultSettings from './defaultSettings';
4+
import proxy from './proxy';
5+
6+
const { REACT_APP_ENV } = process.env;
7+
8+
export default defineConfig({
9+
nodeModulesTransform: {
10+
type: 'none',
11+
exclude: [],
12+
},
13+
history: { type: 'hash' },
14+
dll: false,
15+
hash: true,
16+
antd: {},
17+
dva: {
18+
hmr: true,
19+
},
20+
// base: '/admin/',
21+
publicPath: '/admin/',
22+
// layout: {
23+
// name: 'Ant Design Pro',
24+
// locale: true,
25+
// },
26+
locale: {
27+
// default zh-CN
28+
default: 'zh-CN',
29+
// default true, when it is true, will use `navigator.language` overwrite default
30+
antd: true,
31+
baseNavigator: true,
32+
},
33+
// dynamicImport: {
34+
// loading: '@/components/PageLoading/index',
35+
// },
36+
dynamicImport: false,
37+
targets: {
38+
ie: 11,
39+
},
40+
// umi routes: https://umijs.org/docs/routing
41+
routes: [
42+
{
43+
path: '/user',
44+
layout: false,
45+
routes: [
46+
{
47+
name: 'login',
48+
path: '/user/login',
49+
component: './user/login',
50+
},
51+
],
52+
},
53+
{
54+
component: '@/layouts/Index',
55+
routes: [
56+
{
57+
path: '/quark',
58+
routes: [
59+
{
60+
path: '/quark/engine',
61+
component: './Quark/Engine',
62+
},
63+
],
64+
},
65+
{ path: '/account', component: '../pages/Account/Settings/Info' },
66+
{
67+
path: '/account/settings',
68+
component: '../pages/Account/Settings/Info',
69+
},
70+
{
71+
path: '/account/settings/info',
72+
component: '../pages/Account/Settings/Info',
73+
},
74+
{
75+
path: '/account/settings/security',
76+
component: '../pages/Account/Settings/Security',
77+
},
78+
{
79+
path: '/',
80+
redirect: '/quark/engine?api=admin/dashboard/index',
81+
},
82+
{
83+
component: './404',
84+
},
85+
],
86+
},
87+
],
88+
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
89+
theme: {
90+
// ...darkTheme,
91+
'primary-color': defaultSettings.primaryColor,
92+
},
93+
// @ts-ignore
94+
title: false,
95+
ignoreMomentLocale: true,
96+
proxy: proxy[REACT_APP_ENV || 'dev'],
97+
manifest: {
98+
basePath: '/',
99+
},
100+
});

0 commit comments

Comments
 (0)