Skip to content

Commit 89a711d

Browse files
authored
feat: add front code (#423)
1 parent 981846c commit 89a711d

458 files changed

Lines changed: 55812 additions & 0 deletions

File tree

Some content is hidden

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

front/.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: require.resolve('@umijs/max/eslint'),
3+
};

front/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/node_modules
2+
/.env.local
3+
/.umirc.local.ts
4+
/config/config.local.ts
5+
/src/.umi
6+
/src/.umi-production
7+
/src/.umi-test
8+
/.umi
9+
/.umi-production
10+
/.umi-test
11+
/dist
12+
/.mfsu
13+
.swc

front/.lintstagedrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"*.{md,json}": [
3+
"prettier --cache --write"
4+
],
5+
"*.{js,jsx}": [
6+
"max lint --fix --eslint-only",
7+
"prettier --cache --write"
8+
],
9+
"*.{css,less}": [
10+
"max lint --fix --stylelint-only",
11+
"prettier --cache --write"
12+
],
13+
"*.ts?(x)": [
14+
"max lint --fix --eslint-only",
15+
"prettier --cache --parser=typescript --write"
16+
]
17+
}

front/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
registry=https://registry.npmmirror.com
2+

front/.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.umi
3+
.umi-production

front/.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"printWidth": 80,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"proseWrap": "never",
6+
"overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }],
7+
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-packagejson"]
8+
}

front/.stylelintrc.js

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

front/LEGAL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Legal Disclaimer
2+
3+
Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail.
4+
5+
法律免责声明
6+
7+
关于代码注释部分,中文注释为官方版本,其它语言注释仅做参考。中文注释可能与其它语言注释存在不一致,当中文注释与其它语言注释存在不一致时,请以中文注释为准。

front/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# README
2+
3+
`@umijs/max` 模板项目,更多功能参考 [Umi Max 简介](https://umijs.org/docs/max/introduce)

front/config/config.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { defineConfig } from '@umijs/max';
2+
import routes from './routes';
3+
export default defineConfig({
4+
antd: {
5+
dark: true,
6+
},
7+
access: {},
8+
model: {},
9+
title: 'HoloInsight',
10+
initialState: {},
11+
favicons: ['../src/assets/holoinsight.png'],
12+
request: {},
13+
layout: {
14+
menuHeaderRender: true,
15+
fixHeader: true,
16+
siderWidth: 256,
17+
splitMenus: true,
18+
},
19+
externals: {
20+
react: 'React',
21+
'react-dom': 'ReactDOM',
22+
23+
},
24+
headScripts: [
25+
'/src/assets/react.production.min.js',
26+
'/src/assets/react-dom.production.min.js',
27+
'/src/assets/react-router.min.js',
28+
'/src/assets/holoinsight-magi.min.js',
29+
],
30+
styles: [
31+
32+
],
33+
proxy: {
34+
'/webapi/': {
35+
target: 'http://localhost:8080',
36+
changeOrigin: true,
37+
},
38+
},
39+
esbuildMinifyIIFE: true,
40+
reactRouter5Compat: {},
41+
routes,
42+
npmClient: 'tnpm',
43+
});

0 commit comments

Comments
 (0)