-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: init antd design pro * feat: default settings Co-authored-by: linguowei <linguowei@bytedance.com>
- Loading branch information
1 parent
e27d87a
commit 1be2a77
Showing
138 changed files
with
7,269 additions
and
96 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,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
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 @@ | ||
/lambda/ | ||
/scripts | ||
/config | ||
.history | ||
public | ||
dist | ||
.umi | ||
mock |
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 @@ | ||
module.exports = { | ||
extends: [require.resolve('@umijs/fabric/dist/eslint')], | ||
globals: { | ||
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true, | ||
page: true, | ||
REACT_APP_ENV: 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 |
---|---|---|
@@ -1,104 +1,40 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
# dependencies | ||
**/node_modules | ||
# roadhog-api-doc ignore | ||
/src/utils/request-temp.js | ||
_roadhog-api-doc | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
# production | ||
/dist | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
# misc | ||
.DS_Store | ||
npm-debug.log* | ||
yarn-error.log | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
/coverage | ||
.idea | ||
yarn.lock | ||
package-lock.json | ||
pnpm-lock.yaml | ||
*bak | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
# visual studio code | ||
.history | ||
*.log | ||
functions/* | ||
.temp/** | ||
|
||
# Optional npm cache directory | ||
.npm | ||
# umi | ||
.umi | ||
.umi-production | ||
|
||
# Optional eslint cache | ||
# screenshot | ||
screenshot | ||
.firebase | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
build |
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 @@ | ||
_ |
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,7 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# Export Git hook params | ||
export GIT_PARAMS=$* | ||
|
||
npx --no-install fabric verify-commit |
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 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install lint-staged |
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,23 @@ | ||
**/*.svg | ||
package.json | ||
.umi | ||
.umi-production | ||
/dist | ||
.dockerignore | ||
.DS_Store | ||
.eslintignore | ||
*.png | ||
*.toml | ||
docker | ||
.editorconfig | ||
Dockerfile* | ||
.gitignore | ||
.prettierignore | ||
LICENSE | ||
.eslintcache | ||
*.lock | ||
yarn-error.log | ||
.history | ||
CNAME | ||
/build | ||
/public |
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,5 @@ | ||
const fabric = require('@umijs/fabric'); | ||
|
||
module.exports = { | ||
...fabric.prettier, | ||
}; |
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 @@ | ||
{ | ||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "wangzy.sneak-mark"] | ||
} |
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,5 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"prettier.requireConfig": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} |
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,2 +1,57 @@ | ||
# arana-ui | ||
a ui console for arana. | ||
# Ant Design Pro | ||
|
||
This project is initialized with [Ant Design Pro](https://pro.ant.design). Follow is the quick guide for how to use. | ||
|
||
## Environment Prepare | ||
|
||
Install `node_modules`: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
yarn | ||
``` | ||
|
||
## Provided Scripts | ||
|
||
Ant Design Pro provides some useful script to help you quick start and build with web project, code style check and test. | ||
|
||
Scripts provided in `package.json`. It's safe to modify or add additional script: | ||
|
||
### Start project | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
### Build project | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
### Check code style | ||
|
||
```bash | ||
npm run lint | ||
``` | ||
|
||
You can also use script to auto fix some lint error: | ||
|
||
```bash | ||
npm run lint:fix | ||
``` | ||
|
||
### Test code | ||
|
||
```bash | ||
npm test | ||
``` | ||
|
||
## More | ||
|
||
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). |
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,66 @@ | ||
// https://umijs.org/config/ | ||
import { defineConfig } from '@umijs/max'; | ||
import { join } from 'path'; | ||
import defaultSettings from './defaultSettings'; | ||
import proxy from './proxy'; | ||
import routes from './routes'; | ||
|
||
const { REACT_APP_ENV } = process.env; | ||
|
||
export default defineConfig({ | ||
hash: true, | ||
antd: {}, | ||
request: {}, | ||
initialState: {}, | ||
model: {}, | ||
layout: { | ||
// https://umijs.org/zh-CN/plugins/plugin-layout | ||
locale: true, | ||
siderWidth: 208, | ||
...defaultSettings, | ||
}, | ||
// https://umijs.org/zh-CN/plugins/plugin-locale | ||
locale: { | ||
// default zh-CN | ||
default: 'zh-CN', | ||
antd: true, | ||
// default true, when it is true, will use `navigator.language` overwrite default | ||
baseNavigator: true, | ||
}, | ||
|
||
targets: { | ||
ie: 11, | ||
}, | ||
// umi routes: https://umijs.org/docs/routing | ||
routes, | ||
access: {}, | ||
// Theme for antd: https://ant.design/docs/react/customize-theme-cn | ||
theme: { | ||
// 如果不想要 configProvide 动态设置主题需要把这个设置为 default | ||
// 只有设置为 variable, 才能使用 configProvide 动态设置主色调 | ||
// https://ant.design/docs/react/customize-theme-variable-cn | ||
'root-entry-name': 'variable', | ||
}, | ||
ignoreMomentLocale: true, | ||
proxy: proxy[REACT_APP_ENV || 'dev'], | ||
manifest: { | ||
basePath: '/', | ||
}, | ||
// Fast Refresh 热更新 | ||
fastRefresh: true, | ||
presets: ['umi-presets-pro'], | ||
openAPI: [ | ||
{ | ||
requestLibPath: "import { request } from '@umijs/max'", | ||
// 或者使用在线的版本 | ||
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json" | ||
schemaPath: join(__dirname, 'oneapi.json'), | ||
mock: false, | ||
}, | ||
{ | ||
requestLibPath: "import { request } from '@umijs/max'", | ||
schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json', | ||
projectName: 'swagger', | ||
}, | ||
], | ||
}); |
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,19 @@ | ||
import { Settings as LayoutSettings } from '@ant-design/pro-components'; | ||
|
||
const Settings: LayoutSettings & { | ||
pwa?: boolean; | ||
logo?: string; | ||
} = { | ||
navTheme: 'light', | ||
primaryColor: '#1890ff', | ||
layout: 'mix', | ||
contentWidth: 'Fluid', | ||
fixedHeader: false, | ||
fixSiderbar: true, | ||
pwa: false, | ||
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg', | ||
headerHeight: 56, | ||
splitMenus: false, | ||
}; | ||
|
||
export default Settings; |
Oops, something went wrong.