-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit a402afc Author: Jingchao Di <[email protected]> Date: Sun May 12 00:33:56 2024 +0800 feat: update commit 9f48a0b Author: Jingchao Di <[email protected]> Date: Sat May 11 23:58:07 2024 +0800 feat: reenable commit a876318 Author: Jingchao Di <[email protected]> Date: Sat May 11 23:48:43 2024 +0800 feat: init with umi/max commit 4c9dd59 Author: Jingchao Di <[email protected]> Date: Sat May 11 23:24:19 2024 +0800 feat: enable umi@max
- Loading branch information
Showing
24 changed files
with
4,601 additions
and
6,026 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 @@ | ||
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 @@ | ||
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,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 |
---|---|---|
@@ -1,8 +1,37 @@ | ||
import { defineConfig } from 'umi'; | ||
import { defineConfig } from '@umijs/max'; | ||
|
||
export default defineConfig({ | ||
routes: [{ path: '/', component: 'index' }], | ||
antd: {}, | ||
access: {}, | ||
model: {}, | ||
initialState: {}, | ||
request: {}, | ||
layout: { | ||
title: 'dbml-editor', | ||
locale: false, | ||
}, | ||
routes: [ | ||
{ | ||
path: '/', | ||
component: './Home', | ||
}, | ||
{ | ||
name: 'Source', | ||
path: 'https://github.com/alswl/dbml-editor', | ||
external: true, | ||
}, | ||
{ | ||
name: 'How to use DBML', | ||
path: 'https://dbml.dbdiagram.io/home', | ||
external: true, | ||
}, | ||
{ | ||
name: '@alswl', | ||
path: 'https://twitter.com/alswl', | ||
external: true, | ||
}, | ||
|
||
], | ||
npmClient: 'pnpm', | ||
title: 'dbml-editor by @alswl', | ||
esbuildMinifyIIFE: true, | ||
}); |
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 |
---|---|---|
|
@@ -3,29 +3,35 @@ | |
"version": "0.1.0", | ||
"author": "Jingchao Di <[email protected]>", | ||
"scripts": { | ||
"build": "umi build", | ||
"dev": "umi dev", | ||
"postinstall": "umi setup", | ||
"setup": "umi setup", | ||
"build": "max build", | ||
"dev": "max dev", | ||
"format": "prettier --cache --write .", | ||
"postinstall": "max setup", | ||
"prepare": "husky", | ||
"setup": "max setup", | ||
"start": "npm run dev" | ||
}, | ||
"dependencies": { | ||
"@ant-design/icons": "^5.0.1", | ||
"@ant-design/pro-components": "^2.4.4", | ||
"@antv/layout": "^0.3.25", | ||
"@antv/x6": "^2.18.1", | ||
"@antv/x6-plugin-snapline": "^2.1.7", | ||
"@antv/x6-react-shape": "^2.2.3", | ||
"@dbml/core": "^3.4.3", | ||
"@umijs/max": "^4.2.2", | ||
"antd": "^5.16.5", | ||
"axios": "^1.6.8", | ||
"lodash-es": "^4.17.21", | ||
"monaco-editor": "^0.48.0", | ||
"react-monaco-editor": "^0.55.0", | ||
"umi": "^4.1.10" | ||
"react-monaco-editor": "^0.55.0" | ||
}, | ||
"devDependencies": { | ||
"@types/lodash-es": "^4.17.12", | ||
"@types/react": "^18.0.33", | ||
"@types/react-dom": "^18.0.11", | ||
"husky": "^9", | ||
"lint-staged": "^13.2.0", | ||
"@umijs/plugins": "^4.1.10", | ||
"prettier": "^2.8.8", | ||
"prettier-plugin-organize-imports": "^3.2.2", | ||
|
Oops, something went wrong.