Skip to content

Commit 9969a78

Browse files
committed
同步最新代码 2023-6-20
1 parent 4cb49c0 commit 9969a78

File tree

648 files changed

+18303
-8329
lines changed

Some content is hidden

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

648 files changed

+18303
-8329
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: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
const { execSync } = require('child_process');
4+
5+
const scopes = fs
6+
.readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true })
7+
.filter((dirent) => dirent.isDirectory())
8+
.map((dirent) => dirent.name.replace(/s$/, ''));
9+
10+
// precomputed scope
11+
const scopeComplete = execSync('git status --porcelain || true')
12+
.toString()
13+
.trim()
14+
.split('\n')
15+
.find((r) => ~r.indexOf('M src'))
16+
?.replace(/(\/)/g, '%%')
17+
?.match(/src%%((\w|-)*)/)?.[1]
18+
?.replace(/s$/, '');
19+
20+
/** @type {import('cz-git').UserConfig} */
21+
module.exports = {
22+
ignores: [(commit) => commit.includes('init')],
23+
extends: ['@commitlint/config-conventional'],
24+
rules: {
25+
'body-leading-blank': [2, 'always'],
26+
'footer-leading-blank': [1, 'always'],
27+
'header-max-length': [2, 'always', 108],
28+
'subject-empty': [2, 'never'],
29+
'type-empty': [2, 'never'],
30+
'subject-case': [0],
31+
'type-enum': [
32+
2,
33+
'always',
34+
[
35+
'feat',
36+
'fix',
37+
'perf',
38+
'style',
39+
'docs',
40+
'test',
41+
'refactor',
42+
'build',
43+
'ci',
44+
'chore',
45+
'revert',
46+
'wip',
47+
'workflow',
48+
'types',
49+
'release',
50+
],
51+
],
52+
},
53+
prompt: {
54+
/** @use `yarn commit :f` */
55+
alias: {
56+
f: 'docs: fix typos',
57+
r: 'docs: update README',
58+
s: 'style: update code format',
59+
b: 'build: bump dependencies',
60+
c: 'chore: update config',
61+
},
62+
customScopesAlign: !scopeComplete ? 'top' : 'bottom',
63+
defaultScope: scopeComplete,
64+
scopes: [...scopes, 'mock'],
65+
allowEmptyIssuePrefixs: false,
66+
allowCustomIssuePrefixs: false,
67+
68+
// English
69+
typesAppend: [
70+
{ value: 'wip', name: 'wip: work in process' },
71+
{ value: 'workflow', name: 'workflow: workflow improvements' },
72+
{ value: 'types', name: 'types: type definition file changes' },
73+
],
74+
75+
// 中英文对照版
76+
// messages: {
77+
// type: '选择你要提交的类型 :',
78+
// scope: '选择一个提交范围 (可选):',
79+
// customScope: '请输入自定义的提交范围 :',
80+
// subject: '填写简短精炼的变更描述 :\n',
81+
// body: '填写更加详细的变更描述 (可选)。使用 "|" 换行 :\n',
82+
// breaking: '列举非兼容性重大的变更 (可选)。使用 "|" 换行 :\n',
83+
// footerPrefixsSelect: '选择关联issue前缀 (可选):',
84+
// customFooterPrefixs: '输入自定义issue前缀 :',
85+
// footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
86+
// confirmCommit: '是否提交或修改commit ?',
87+
// },
88+
// types: [
89+
// { value: 'feat', name: 'feat: 新增功能' },
90+
// { value: 'fix', name: 'fix: 修复缺陷' },
91+
// { value: 'docs', name: 'docs: 文档变更' },
92+
// { value: 'style', name: 'style: 代码格式' },
93+
// { value: 'refactor', name: 'refactor: 代码重构' },
94+
// { value: 'perf', name: 'perf: 性能优化' },
95+
// { value: 'test', name: 'test: 添加疏漏测试或已有测试改动' },
96+
// { value: 'build', name: 'build: 构建流程、外部依赖变更 (如升级 npm 包、修改打包配置等)' },
97+
// { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
98+
// { value: 'revert', name: 'revert: 回滚 commit' },
99+
// { value: 'chore', name: 'chore: 对构建过程或辅助工具和库的更改 (不影响源文件、测试用例)' },
100+
// { value: 'wip', name: 'wip: 正在开发中' },
101+
// { value: 'workflow', name: 'workflow: 工作流程改进' },
102+
// { value: 'types', name: 'types: 类型定义文件修改' },
103+
// ],
104+
// emptyScopesAlias: 'empty: 不填写',
105+
// customScopesAlias: 'custom: 自定义',
106+
},
107+
};

.env

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
# port
2-
VITE_PORT = 3100
3-
41
# spa-title
5-
VITE_GLOB_APP_TITLE = Mars3D Admin
6-
7-
# spa shortname
8-
VITE_GLOB_APP_SHORT_NAME = mars3d_admin
2+
VITE_GLOB_APP_TITLE = Vben Admin

.env.analyze

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Whether to open mock
2+
VITE_USE_MOCK = true
3+
4+
# public path
5+
VITE_PUBLIC_PATH = /
6+
7+
# Whether to enable gzip or brotli compression
8+
# Optional: gzip | brotli | none
9+
# If you need multiple forms, you can use `,` to separate
10+
VITE_BUILD_COMPRESS = 'none'
11+
12+
13+
# Basic interface address SPA
14+
VITE_GLOB_API_URL=/basic-api
15+
16+
# File upload address, optional
17+
# It can be forwarded by nginx or write the actual address directly
18+
VITE_GLOB_UPLOAD_URL=/upload
19+
20+
# Interface prefix
21+
VITE_GLOB_API_URL_PREFIX=
22+
23+
VITE_ENABLE_ANALYZE = true

.env.development

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ VITE_USE_MOCK = true
44
# public path
55
VITE_PUBLIC_PATH = /
66

7-
# Cross-domain proxy, you can configure multiple
8-
# Please note that no line breaks
9-
VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]]
10-
# VITE_PROXY=[["/api","https://vvbin.cn/test"]]
11-
12-
# Delete console
13-
VITE_DROP_CONSOLE = false
14-
157
# Basic interface address SPA
168
VITE_GLOB_API_URL=/basic-api
179

.env.production

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@ VITE_USE_MOCK = true
44
# public path
55
VITE_PUBLIC_PATH = /
66

7-
# Delete console
8-
VITE_DROP_CONSOLE = true
9-
107
# Whether to enable gzip or brotli compression
118
# Optional: gzip | brotli | none
129
# If you need multiple forms, you can use `,` to separate
1310
VITE_BUILD_COMPRESS = 'none'
1411

15-
# Whether to delete origin files when using compress, default false
16-
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
1712

1813
# Basic interface address SPA
1914
VITE_GLOB_API_URL=/basic-api
@@ -24,12 +19,3 @@ VITE_GLOB_UPLOAD_URL=/upload
2419

2520
# Interface prefix
2621
VITE_GLOB_API_URL_PREFIX=
27-
28-
# Whether to enable image compression
29-
VITE_USE_IMAGEMIN= true
30-
31-
# use pwa
32-
VITE_USE_PWA = false
33-
34-
# Is it compatible with older browsers
35-
VITE_LEGACY = false

.env.test

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@ VITE_USE_MOCK = true
55
# public path
66
VITE_PUBLIC_PATH = /
77

8-
# Delete console
9-
VITE_DROP_CONSOLE = true
10-
118
# Whether to enable gzip or brotli compression
129
# Optional: gzip | brotli | none
1310
# If you need multiple forms, you can use `,` to separate
1411
VITE_BUILD_COMPRESS = 'none'
1512

16-
# Whether to delete origin files when using compress, default false
17-
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
18-
1913
# Basic interface address SPA
2014
VITE_GLOB_API_URL=/basic-api
2115

@@ -25,12 +19,3 @@ VITE_GLOB_UPLOAD_URL=/upload
2519

2620
# Interface prefix
2721
VITE_GLOB_API_URL_PREFIX=
28-
29-
# Whether to enable image compression
30-
VITE_USE_IMAGEMIN= true
31-
32-
# use pwa
33-
VITE_USE_PWA = false
34-
35-
# Is it compatible with older browsers
36-
VITE_LEGACY = false

.eslintrc.js

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,4 @@
11
module.exports = {
22
root: true,
3-
env: {
4-
browser: true,
5-
node: true,
6-
es6: true,
7-
},
8-
parser: 'vue-eslint-parser',
9-
parserOptions: {
10-
parser: '@typescript-eslint/parser',
11-
ecmaVersion: 2020,
12-
sourceType: 'module',
13-
jsxPragma: 'React',
14-
ecmaFeatures: {
15-
jsx: true,
16-
},
17-
},
18-
extends: [
19-
'plugin:vue/vue3-recommended',
20-
'plugin:@typescript-eslint/recommended',
21-
'plugin:prettier/recommended',
22-
],
23-
rules: {
24-
'vue/script-setup-uses-vars': 'error',
25-
'@typescript-eslint/ban-ts-ignore': 'off',
26-
'@typescript-eslint/explicit-function-return-type': 'off',
27-
'@typescript-eslint/no-explicit-any': 'off',
28-
'@typescript-eslint/no-var-requires': 'off',
29-
'@typescript-eslint/no-empty-function': 'off',
30-
'vue/custom-event-name-casing': 'off',
31-
'no-use-before-define': 'off',
32-
'@typescript-eslint/no-use-before-define': 'off',
33-
'@typescript-eslint/ban-ts-comment': 'off',
34-
'@typescript-eslint/ban-types': 'off',
35-
'@typescript-eslint/no-non-null-assertion': 'off',
36-
'@typescript-eslint/explicit-module-boundary-types': 'off',
37-
'@typescript-eslint/no-unused-vars': [
38-
'error',
39-
{
40-
argsIgnorePattern: '^_',
41-
varsIgnorePattern: '^_',
42-
},
43-
],
44-
'no-unused-vars': [
45-
'error',
46-
{
47-
argsIgnorePattern: '^_',
48-
varsIgnorePattern: '^_',
49-
},
50-
],
51-
'space-before-function-paren': 'off',
52-
53-
'vue/attributes-order': 'off',
54-
'vue/one-component-per-file': 'off',
55-
'vue/html-closing-bracket-newline': 'off',
56-
'vue/max-attributes-per-line': 'off',
57-
'vue/multiline-html-element-content-newline': 'off',
58-
'vue/singleline-html-element-content-newline': 'off',
59-
'vue/attribute-hyphenation': 'off',
60-
'vue/require-default-prop': 'off',
61-
'vue/require-explicit-emits': 'off',
62-
'vue/html-self-closing': [
63-
'error',
64-
{
65-
html: {
66-
void: 'always',
67-
normal: 'never',
68-
component: 'always',
69-
},
70-
svg: 'always',
71-
math: 'always',
72-
},
73-
],
74-
'vue/multi-word-component-names': 'off',
75-
},
3+
extends: ['@vben'],
764
};

.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: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
node_modules
22
.DS_Store
33
dist
4-
dist.zip
5-
dist.rar
6-
.npmrc
74
.cache
5+
.turbo
86

97
tests/server/static
108
tests/server/static/upload
@@ -30,6 +28,13 @@ pnpm-debug.log*
3028
*.sln
3129
*.sw?
3230

33-
yarn.lock
3431
package-lock.json
35-
.vscode/
32+
pnpm-lock.yaml
33+
34+
.history
35+
36+
/node_modules
37+
public/lib/CesiumUnminified/
38+
packages/mars3d/dist/plugins/
39+
packages/mars3d/node_modules/
40+
mars3d-*src.*

0 commit comments

Comments
 (0)