Skip to content

Commit efa8905

Browse files
committed
init
0 parents  commit efa8905

File tree

133 files changed

+7350
-0
lines changed

Some content is hidden

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

133 files changed

+7350
-0
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

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
**/node_modules
5+
# roadhog-api-doc ignore
6+
/src/utils/request-temp.js
7+
_roadhog-api-doc
8+
9+
# production
10+
/dist
11+
/.vscode
12+
13+
# misc
14+
.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/**
30+
31+
# umi
32+
.umi
33+
.umi-production
34+
35+
# screenshot
36+
screenshot
37+
.firebase
38+
.eslintcache
39+
40+
build

.prettierignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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

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

README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Ant Design Pro
2+
3+
This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use.
4+
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
38+
39+
```bash
40+
npm run lint
41+
```
42+
43+
You can also use script to auto fix some lint error:
44+
45+
```bash
46+
npm run lint:fix
47+
```
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.dev.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// https://umijs.org/config/
2+
import { defineConfig } from 'umi';
3+
4+
export default defineConfig({
5+
plugins: [
6+
// https://github.com/zthxxx/react-dev-inspector
7+
'react-dev-inspector/plugins/umi/react-inspector',
8+
],
9+
// https://github.com/zthxxx/react-dev-inspector#inspector-loader-props
10+
inspectorConfig: {
11+
exclude: [],
12+
babelPlugins: [],
13+
babelOptions: {},
14+
},
15+
// mfsu: {},
16+
// webpack5: {
17+
// // lazyCompilation: {},
18+
// },
19+
});

config/config.ts

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

config/defaultSettings.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
layout: 'mix',
11+
contentWidth: 'Fluid',
12+
fixedHeader: false,
13+
fixSiderbar: true,
14+
colorWeak: false,
15+
title: 'Ant Design Pro',
16+
pwa: false,
17+
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
18+
iconfontUrl: '',
19+
};
20+
21+
export default Settings;

0 commit comments

Comments
 (0)