Skip to content

Commit afbcd80

Browse files
author
wanglihuya
committed
init
1 parent 93c0896 commit afbcd80

File tree

147 files changed

+12585
-34
lines changed

Some content is hidden

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

147 files changed

+12585
-34
lines changed

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[Makefile]
16+
indent_style = tab

.eslintignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/lambda/
2+
/scripts
3+
/config
4+
.history
5+
public
6+
dist
7+
.umi
8+
mock

.eslintrc.js

+8
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

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
18+
19+
### NetBeans ###
20+
/nbproject/private/
21+
/nbbuild/
22+
/dist/
23+
/nbdist/
24+
/.nb-gradle/
25+
/starter/propro.jar
26+
27+
node_modules
28+
.DS_Store
29+
dist
30+
.npmrc
31+
.cache
32+
33+
tests/server/static
34+
tests/server/static/upload
35+
36+
.local
37+
# local env files
38+
.env.local
39+
.env.*.local
40+
.eslintcache
41+
42+
# Log files
43+
npm-debug.log*
44+
yarn-debug.log*
45+
yarn-error.log*
46+
pnpm-debug.log*
47+
48+
.vscode
49+
*.suo
50+
*.ntvs*
51+
*.njsproj
52+
*.sln
53+
*.sw?
54+
55+
56+
57+
# roadhog-api-doc ignore
58+
/src/utils/request-temp.js
59+
_roadhog-api-doc
60+
61+
# production
62+
/dist
63+
/.vscode
64+
65+
# misc
66+
.DS_Store
67+
npm-debug.log*
68+
yarn-error.log
69+
70+
/coverage
71+
.idea
72+
yarn.lock
73+
package-lock.json
74+
*bak
75+
.vscode
76+
77+
# visual studio code
78+
.history
79+
*.log
80+
functions/*
81+
.temp/**
82+
83+
# umi
84+
.umi
85+
.umi-production
86+
87+
# screenshot
88+
screenshot
89+
.firebase
90+
.eslintcache

.prettierignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
**/*.svg
2+
package.json
3+
.umi
4+
.umi-production
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
23+
/public
24+
.idea
25+
.vscode

.prettierrc.js

+5
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

+5
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+
};

CODEOWNERS

-21
This file was deleted.

README.md

+39-13
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,57 @@
1-
# propro/ProPro-Front
1+
# Ant Design Pro
22

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

5+
## Environment Prepare
46

5-
## Getting Started
7+
Install `node_modules`:
68

7-
Download links:
9+
```bash
10+
npm install
11+
```
12+
13+
or
14+
15+
```bash
16+
yarn
17+
```
18+
19+
## Provided Scripts
820

9-
SSH clone URL: ssh://[email protected]/csibio/propro/ProPro-Front.git
21+
Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test.
1022

11-
HTTPS clone URL: https://git.jetbrains.space/csibio/propro/ProPro-Front.git
23+
Scripts provided in `package.json`. It's safe to modify or add additional script:
1224

25+
### Start project
1326

27+
```bash
28+
npm start
29+
```
1430

15-
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
31+
### Build project
1632

17-
## Prerequisites
33+
```bash
34+
npm run build
35+
```
1836

19-
What things you need to install the software and how to install them.
37+
### Check code style
2038

39+
```bash
40+
npm run lint
2141
```
22-
Examples
42+
43+
You can also use script to auto fix some lint error:
44+
45+
```bash
46+
npm run lint:fix
2347
```
2448

25-
## Deployment
49+
### Test code
2650

27-
Add additional notes about how to deploy this on a production system.
51+
```bash
52+
npm test
53+
```
2854

29-
## Resources
55+
## More
3056

31-
Add links to external resources for this project, such as CI server, bug tracker, etc.
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.dev.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from 'umi';
2+
3+
export default defineConfig({
4+
plugins: ['react-dev-inspector/plugins/umi/react-inspector'],
5+
inspectorConfig: {
6+
exclude: [],
7+
babelPlugins: [],
8+
babelOptions: {},
9+
},
10+
proxy: {
11+
'/api/': {
12+
// target: 'https://preview.pro.ant.design',
13+
target: 'http://192.168.1.110:9000/lims',
14+
changeOrigin: true,
15+
pathRewrite: { '^': '' },
16+
},
17+
},
18+
});

config/config.ts

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { defineConfig } from 'umi';
2+
import { join } from 'path';
3+
4+
import defaultSettings from './defaultSettings';
5+
import proxy from './proxy';
6+
import routes from './routes';
7+
8+
const { REACT_APP_ENV } = process.env;
9+
10+
export default defineConfig({
11+
hash: true,
12+
antd: {},
13+
dva: {
14+
hmr: true,
15+
},
16+
layout: {
17+
locale: true,
18+
siderWidth: 208,
19+
...defaultSettings,
20+
},
21+
locale: {
22+
default: 'zh-CN',
23+
antd: true,
24+
// default true, when it is true, will use `navigator.language` overwrite default
25+
baseNavigator: true,
26+
},
27+
dynamicImport: {
28+
loading: '@ant-design/pro-layout/es/PageLoading',
29+
},
30+
targets: {
31+
ie: 11,
32+
},
33+
routes,
34+
theme: {
35+
'primary-color': defaultSettings.primaryColor,
36+
},
37+
// esbuild is father build tools
38+
esbuild: {},
39+
title: false,
40+
ignoreMomentLocale: true,
41+
proxy: proxy[REACT_APP_ENV || 'dev'],
42+
43+
manifest: {
44+
basePath: '/',
45+
},
46+
// Fast Refresh 热更新
47+
fastRefresh: {},
48+
openAPI: [
49+
{
50+
requestLibPath: "import { request } from 'umi'",
51+
// 或者使用在线的版本
52+
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
53+
schemaPath: join(__dirname, 'oneapi.json'),
54+
mock: false,
55+
},
56+
{
57+
requestLibPath: "import { request } from 'umi'",
58+
schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
59+
projectName: 'swagger',
60+
},
61+
],
62+
nodeModulesTransform: { type: 'none' },
63+
mfsu: {},
64+
webpack5: {},
65+
exportStatic: {},
66+
});

config/defaultSettings.ts

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Settings as LayoutSettings } from '@ant-design/pro-layout';
2+
3+
const Settings: LayoutSettings & {
4+
pwa?: boolean;
5+
logo?: string;
6+
} = {
7+
navTheme: 'light',
8+
// 拂晓蓝
9+
primaryColor: '#1890ff',
10+
// primaryColor: 'tomato',
11+
layout: 'mix',
12+
contentWidth: 'Fluid',
13+
fixedHeader: false,
14+
fixSiderbar: true,
15+
colorWeak: false,
16+
title: 'CSi Propro',
17+
pwa: false,
18+
logo: 'https://i.loli.net/2021/07/30/DouWILdjJBK6GEk.png',
19+
iconfontUrl: '',
20+
};
21+
22+
export default Settings;

0 commit comments

Comments
 (0)