Skip to content

Commit e35c533

Browse files
committed
chore: chore update
2 parents c19007d + b437de9 commit e35c533

24 files changed

+546
-171
lines changed

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ registry = https://registry.npmmirror.com
44
strict-peer-dependencies=false
55
auto-install-peers=true
66
shamefully-hoist=true
7+
ignore-workspace-root-check=true
8+
install-workspace-root=true

.prettierignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

.prettierrc.cjs

Lines changed: 0 additions & 19 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 22 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,10 @@
11
{
2-
// 默认格式化工具选择prettier
3-
"editor.defaultFormatter": "esbenp.prettier-vscode",
4-
5-
// 配置stylelint检查的文件类型范围
6-
"stylelint.validate": ["css", "scss", "vue", "html"], // 与package.json的scripts对应
7-
"stylelint.enable": true,
8-
"css.validate": false,
9-
"less.validate": false,
10-
"scss.validate": false,
11-
"[shellscript]": {
12-
"editor.defaultFormatter": "foxundermoon.shell-format"
13-
},
14-
"[dotenv]": {
15-
"editor.defaultFormatter": "foxundermoon.shell-format"
16-
},
17-
"[vue]": {
18-
"editor.defaultFormatter": "esbenp.prettier-vscode"
19-
},
20-
"[typescript]": {
21-
"editor.defaultFormatter": "esbenp.prettier-vscode"
22-
},
23-
"[jsonc]": {
24-
"editor.defaultFormatter": "esbenp.prettier-vscode"
25-
},
262
// 配置语言的文件关联
273
"files.associations": {
284
"pages.json": "jsonc", // pages.json 可以写注释
295
"manifest.json": "jsonc" // manifest.json 可以写注释
306
},
31-
"cSpell.words": [
32-
"aliyun",
33-
"Aplipay",
34-
"climblee",
35-
"commitlint",
36-
"dcloudio",
37-
"iconfont",
38-
"oxlint",
39-
"qrcode",
40-
"refresherrefresh",
41-
"scrolltolower",
42-
"tabbar",
43-
"Toutiao",
44-
"unibest",
45-
"uview",
46-
"uvui",
47-
"vitepress",
48-
"Wechat",
49-
"WechatMiniprogram",
50-
"Weixin"
51-
],
7+
528
"typescript.tsdk": "node_modules\\typescript\\lib",
539
"explorer.fileNesting.enabled": true,
5410
"explorer.fileNesting.expand": false,
@@ -59,16 +15,6 @@
5915
"eslint.config.mjs": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
6016
},
6117

62-
// // 保存的时候自动格式化
63-
// "prettier.enable": true,
64-
// "editor.formatOnSave": true,
65-
// // 开启自动修复
66-
// "editor.codeActionsOnSave": {
67-
// "source.fixAll": "explicit",
68-
// "source.fixAll.eslint": "explicit",
69-
// "source.fixAll.stylelint": "explicit"
70-
// },
71-
7218
// Disable the default formatter, use eslint instead
7319
"prettier.enable": false,
7420
"editor.formatOnSave": false,
@@ -117,5 +63,26 @@
11763
"scss",
11864
"pcss",
11965
"postcss"
66+
],
67+
"cSpell.words": [
68+
"alova",
69+
"Aplipay",
70+
"climblee",
71+
"commitlint",
72+
"dcloudio",
73+
"iconfont",
74+
"oxlint",
75+
"qrcode",
76+
"refresherrefresh",
77+
"scrolltolower",
78+
"tabbar",
79+
"Toutiao",
80+
"uniapp",
81+
"unibest",
82+
"uview",
83+
"uvui",
84+
"Wechat",
85+
"WechatMiniprogram",
86+
"Weixin"
12087
]
12188
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 菲鸽
3+
Copyright (c) 2025 菲鸽
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<p align="center">
2-
<a href="https://github.com/feige996/unibest">
2+
<a href="https://github.com/unibest-tech/unibest">
33
<img width="160" src="./src/static/logo.svg">
44
</a>
55
</p>
66

77
<h1 align="center">
8-
<a href="https://github.com/feige996/unibest" target="_blank">unibest - 最好的 uniapp 开发框架</a>
8+
<a href="https://github.com/unibest-tech/unibest" target="_blank">unibest - 最好的 uniapp 开发框架</a>
99
</h1>
1010

1111
<div align="center">

env/.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ VITE_APP_PUBLIC_BASE=/
99

1010
# 登录页面
1111
VITE_LOGIN_URL = '/pages/login/index'
12-
12+
# 第一个请求地址
1313
VITE_SERVER_BASEURL = 'https://ukw0y1.laf.run'
14+
# 第二个请求地址
15+
VITE_API_SECONDARY_URL = 'https://ukw0y1.laf.run'
16+
1417
VITE_UPLOAD_BASEURL = 'https://ukw0y1.laf.run/upload'
1518

1619
# 有些同学可能需要在微信小程序里面根据 develop、trial、release 分别设置上传地址,参考代码如下。

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ export default uniHelper({
77
ignores: [
88
'src/uni_modules/',
99
'dist',
10+
// unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用
11+
'auto-import.d.ts',
12+
// vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore
13+
'uni-pages.d.ts',
14+
// 插件生成的文件
15+
'src/pages.json',
16+
'src/manifest.json',
17+
// 忽略自动生成文件
18+
'src/service/app/**',
1019
],
1120
rules: {
1221
'no-console': 'off',
@@ -19,4 +28,16 @@ export default uniHelper({
1928
'ts/no-empty-object-type': 'off',
2029
'no-extend-native': 'off',
2130
},
31+
formatters: {
32+
/**
33+
* Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
34+
* By default uses Prettier
35+
*/
36+
css: true,
37+
/**
38+
* Format HTML files
39+
* By default uses Prettier
40+
*/
41+
html: true,
42+
},
2243
})

manifest.config.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ import process from 'node:process'
44
import { defineManifestConfig } from '@uni-helper/vite-plugin-uni-manifest'
55
import { loadEnv } from 'vite'
66

7+
// 手动解析命令行参数获取 mode
8+
function getMode() {
9+
const args = process.argv.slice(2)
10+
const modeFlagIndex = args.findIndex(arg => arg === '--mode')
11+
return modeFlagIndex !== -1 ? args[modeFlagIndex + 1] : args[0] === 'build' ? 'production' : 'development' // 默认 development
12+
}
713
// 获取环境变量的范例
8-
const env = loadEnv(process.env.NODE_ENV!, path.resolve(process.cwd(), 'env'))
14+
const env = loadEnv(getMode(), path.resolve(process.cwd(), 'env'))
915
const {
1016
VITE_APP_TITLE,
1117
VITE_UNI_APPID,
@@ -24,7 +30,7 @@ export default defineManifestConfig({
2430
'locale': VITE_FALLBACK_LOCALE, // 'zh-Hans'
2531
'h5': {
2632
router: {
27-
base: VITE_APP_PUBLIC_BASE,
33+
// base: VITE_APP_PUBLIC_BASE,
2834
},
2935
},
3036
/* 5+App特有相关 */

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@
139139
"@vue/tsconfig": "^0.1.3",
140140
"autoprefixer": "^10.4.20",
141141
"eslint": "^9.29.0",
142+
"eslint-plugin-format": "^1.0.1",
142143
"husky": "^9.1.7",
143144
"lint-staged": "^15.2.10",
144145
"openapi-ts-request": "^1.1.2",
145146
"postcss": "^8.4.49",
146147
"postcss-html": "^1.7.0",
147148
"postcss-scss": "^4.0.9",
148-
"prettier": "^3.5.3",
149149
"rollup-plugin-visualizer": "^5.12.0",
150150
"sass": "1.77.8",
151151
"terser": "^5.36.0",

0 commit comments

Comments
 (0)