-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lem
committed
Mar 8, 2023
0 parents
commit ede9aa4
Showing
34 changed files
with
12,099 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: require.resolve('@umijs/max/eslint'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/node_modules | ||
/.env.local | ||
/.umirc.local.ts | ||
/config/config.local.ts | ||
/src/.umi | ||
/src/.umi-production | ||
/src/.umi-test | ||
/.umi | ||
/.umi-production | ||
/.umi-test | ||
/dist | ||
/.mfsu | ||
.swc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install max verify-commit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install lint-staged --quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"*.{md,json}": [ | ||
"prettier --cache --write" | ||
], | ||
"*.{js,jsx}": [ | ||
"max lint --fix --eslint-only", | ||
"prettier --cache --write" | ||
], | ||
"*.{css,less}": [ | ||
"max lint --fix --stylelint-only", | ||
"prettier --cache --write" | ||
], | ||
"*.ts?(x)": [ | ||
"max lint --fix --eslint-only", | ||
"prettier --cache --parser=typescript --write" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
registry=https://registry.npmmirror.com | ||
strict-peer-dependencies=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.umi | ||
.umi-production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"proseWrap": "never", | ||
"overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }], | ||
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-packagejson"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: require.resolve('@umijs/max/stylelint'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { defineConfig } from '@umijs/max'; | ||
|
||
export default defineConfig({ | ||
antd: {}, | ||
access: {}, | ||
model: {}, | ||
initialState: {}, | ||
request: {}, | ||
layout: { | ||
title: '@umijs/max', | ||
}, | ||
routes: [ | ||
{ | ||
path: '/', | ||
redirect: '/home', | ||
}, | ||
{ | ||
name: '首页', | ||
path: '/home', | ||
component: './Home', | ||
}, | ||
{ | ||
name: '权限演示', | ||
path: '/access', | ||
component: './Access', | ||
}, | ||
{ | ||
name: ' CRUD 示例', | ||
path: '/table', | ||
component: './Table', | ||
}, | ||
], | ||
npmClient: 'pnpm', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# README | ||
|
||
`@umijs/max` 模板项目,更多功能参考 [Umi Max 简介](https://umijs.org/docs/max/introduce) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const users = [ | ||
{ id: 0, name: 'Umi', nickName: 'U', gender: 'MALE' }, | ||
{ id: 1, name: 'Fish', nickName: 'B', gender: 'FEMALE' }, | ||
]; | ||
|
||
export default { | ||
'GET /api/v1/queryUserList': (req: any, res: any) => { | ||
res.json({ | ||
success: true, | ||
data: { list: users }, | ||
errorCode: 0, | ||
}); | ||
}, | ||
'PUT /api/v1/user/': (req: any, res: any) => { | ||
res.json({ | ||
success: true, | ||
errorCode: 0, | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"private": true, | ||
"author": "lem <[email protected]>", | ||
"scripts": { | ||
"build": "max build", | ||
"dev": "max dev", | ||
"format": "prettier --cache --write .", | ||
"postinstall": "max setup", | ||
"prepare": "husky install", | ||
"setup": "max setup", | ||
"start": "npm run dev" | ||
}, | ||
"dependencies": { | ||
"@ant-design/icons": "^4.7.0", | ||
"@ant-design/pro-components": "^2.0.1", | ||
"@umijs/max": "^4.0.56", | ||
"antd": "^5.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.0", | ||
"@types/react-dom": "^18.0.0", | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.3", | ||
"prettier": "^2.7.1", | ||
"prettier-plugin-organize-imports": "^2", | ||
"prettier-plugin-packagejson": "^2", | ||
"typescript": "^4.1.2" | ||
} | ||
} |
Oops, something went wrong.