Skip to content

Commit a316b44

Browse files
authored
feat: create vben project (#1)
1 parent ef70fae commit a316b44

File tree

896 files changed

+70745
-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.

896 files changed

+70745
-0
lines changed

.browserslistrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
> 1%
2+
last 2 versions
3+
not dead
4+
not ie 11

.commitlintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@vben/commitlint-config';

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
.git
3+
.gitignore
4+
*.md
5+
dist
6+
.turbo
7+
dist.zip

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings
2+
3+
# Automatically normalize line endings (to LF) for all text-based files.
4+
* text=auto eol=lf
5+
6+
# Declare files that will always have CRLF line endings on checkout.
7+
*.{cmd,[cC][mM][dD]} text eol=crlf
8+
*.{bat,[bB][aA][tT]} text eol=crlf
9+
10+
# Denote all files that are truly binary and should not be modified.
11+
*.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
dist.zip
6+
dist.tar
7+
dist.war
8+
.nitro
9+
.output
10+
*-dist.zip
11+
*-dist.tar
12+
*-dist.war
13+
coverage
14+
*.local
15+
**/.vitepress/cache
16+
.cache
17+
.turbo
18+
.temp
19+
dev-dist
20+
.stylelintcache
21+
yarn.lock
22+
package-lock.json
23+
.VSCodeCounter
24+
**/backend-mock/data
25+
26+
# local env files
27+
.env.local
28+
.env.*.local
29+
.eslintcache
30+
31+
logs
32+
*.log
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
pnpm-debug.log*
37+
lerna-debug.log*
38+
vite.config.mts.*
39+
vite.config.mjs.*
40+
vite.config.js.*
41+
vite.config.ts.*
42+
43+
# Editor directories and files
44+
.idea
45+
.vscode
46+
*.suo
47+
*.ntvs*
48+
*.njsproj
49+
*.sln
50+
*.sw?
51+
.history

.lintstagedrc.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export default {
2+
'*.{js,jsx,ts,tsx}': [
3+
'prettier --cache --ignore-unknown --write',
4+
'eslint --cache --fix',
5+
],
6+
'*.{scss,less,styl,html,vue,css}': [
7+
'prettier --cache --ignore-unknown --write',
8+
'stylelint --fix --allow-empty-input',
9+
],
10+
'*.md': ['prettier --cache --ignore-unknown --write'],
11+
'*.vue': [
12+
'prettier --write',
13+
'eslint --cache --fix',
14+
'stylelint --fix --allow-empty-input',
15+
],
16+
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
17+
'prettier --cache --write--parser json',
18+
],
19+
'package.json': ['prettier --cache --write'],
20+
};

.npmrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
registry = "https://registry.npmmirror.com"
2+
public-hoist-pattern[]=eslint
3+
public-hoist-pattern[]=prettier
4+
public-hoist-pattern[]=prettier-plugin-tailwindcss
5+
public-hoist-pattern[]=stylelint
6+
public-hoist-pattern[]=*postcss*
7+
public-hoist-pattern[]=@commitlint/*
8+
public-hoist-pattern[]=czg
9+
10+
strict-peer-dependencies=false
11+
auto-install-peers=true
12+
dedupe-peer-dependents=true

.prettierignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
dist
2+
dev-dist
3+
.local
4+
.output.js
5+
node_modules
6+
.nvmrc
7+
coverage
8+
CODEOWNERS
9+
.nitro
10+
.output
11+
12+
13+
**/*.svg
14+
**/*.sh
15+
16+
public
17+
.npmrc
18+
*-lock.yaml

.prettierrc.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@vben/prettier-config';

.stylelintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
public
3+
__tests__
4+
coverage

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# FBA UI
2+
3+
Front-end Implementation of
4+
the [FastAPI Best Architecture](https://github.com/fastapi-practices/fastapi_best_architecture)
5+
6+
## Run
7+
8+
```shell
9+
pnpm install
10+
pnpm dev
11+
```
12+
13+
## Build
14+
15+
```shell
16+
pnpm build
17+
```
18+
19+
## Contributors
20+
21+
<a href="https://github.com/fastapi-practices/fba_ui/graphs/contributors">
22+
<img src="https://contrib.rocks/image?repo=fastapi-practices/fba_ui"/>
23+
</a>
24+
25+
## Special thanks
26+
27+
- [Vue.js](https://cn.vuejs.org/guide/introduction.html)
28+
- [Vben Admin](https://www.vben.pro/)
29+
- ...
30+
31+
## Sponsor us
32+
33+
If this program has helped you, you can sponsor us with some coffee
34+
beans: [:coffee: Sponsor :coffee:](https://wu-clan.github.io/sponsor/)
35+
36+
## License
37+
38+
This project is licensed under the terms of
39+
the [MIT](https://github.com/fastapi-practices/fba_ui/blob/master/LICENSE) license

apps/web-antd/.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 应用标题
2+
VITE_APP_TITLE=FBA
3+
4+
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
5+
VITE_APP_NAMESPACE=fba-ui

apps/web-antd/.env.analyze

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
VITE_BASE=/
2+
3+
# Basic interface address SPA
4+
VITE_GLOB_API_URL=https://xxx/api
5+
6+
VITE_VISUALIZER=true

apps/web-antd/.env.development

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
VITE_BASE=/
2+
3+
# 端口号
4+
VITE_PORT=5173
5+
6+
# 接口地址
7+
VITE_GLOB_API_URL=http://localhost:8000/api
8+
9+
# 是否打开 devtools,true 为打开,false 为关闭
10+
VITE_DEVTOOLS=false
11+
12+
# 是否注入全局loading
13+
VITE_INJECT_APP_LOADING=true

apps/web-antd/.env.production

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
VITE_BASE=/
2+
3+
# 接口地址
4+
VITE_GLOB_API_URL=https://xxx/api
5+
6+
# 是否开启压缩,可以设置为 none, brotli, gzip
7+
VITE_COMPRESS=gzip
8+
9+
# 是否开启 PWA
10+
VITE_PWA=false
11+
12+
# vue-router 的模式
13+
VITE_ROUTER_HISTORY=hash
14+
15+
# 是否注入全局loading
16+
VITE_INJECT_APP_LOADING=true
17+
18+
# 打包后是否生成dist.zip
19+
VITE_ARCHIVER=true

apps/web-antd/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!doctype html>
2+
<html lang="zh">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
6+
<meta name="renderer" content="webkit" />
7+
<meta name="description" content="A Modern Back-end Management System" />
8+
<meta name="keywords" content="FBA" />
9+
<meta name="author" content="FastAPI Practices" />
10+
<meta
11+
name="viewport"
12+
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
13+
/>
14+
<!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 -->
15+
<title><%= VITE_APP_TITLE %></title>
16+
<link
17+
rel="icon"
18+
href="https://wu-clan.github.io/picx-images-hosting/logo/fba.svg"
19+
/>
20+
</head>
21+
<body>
22+
<div id="app"></div>
23+
<script type="module" src="/src/main.ts"></script>
24+
</body>
25+
</html>

apps/web-antd/package.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "fba_ui",
3+
"version": "0.0.1",
4+
"scripts": {
5+
"build": "pnpm vite build --mode production",
6+
"build:analyze": "pnpm vite build --mode analyze",
7+
"dev": "pnpm vite --mode development",
8+
"preview": "vite preview",
9+
"typecheck": "vue-tsc --noEmit --skipLibCheck"
10+
},
11+
"imports": {
12+
"#/*": "./src/*"
13+
},
14+
"dependencies": {
15+
"@vben/access": "workspace:*",
16+
"@vben/common-ui": "workspace:*",
17+
"@vben/constants": "workspace:*",
18+
"@vben/hooks": "workspace:*",
19+
"@vben/icons": "workspace:*",
20+
"@vben/layouts": "workspace:*",
21+
"@vben/locales": "workspace:*",
22+
"@vben/plugins": "workspace:*",
23+
"@vben/preferences": "workspace:*",
24+
"@vben/request": "workspace:*",
25+
"@vben/stores": "workspace:*",
26+
"@vben/styles": "workspace:*",
27+
"@vben/types": "workspace:*",
28+
"@vben/utils": "workspace:*",
29+
"@vueuse/core": "catalog:",
30+
"ant-design-vue": "catalog:",
31+
"dayjs": "catalog:",
32+
"pinia": "catalog:",
33+
"vue": "catalog:",
34+
"vue-router": "catalog:"
35+
}
36+
}

apps/web-antd/postcss.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@vben/tailwind-config/postcss';

0 commit comments

Comments
 (0)