feat: 整理目录结构
Some checks failed
/ playwright (push) Has been skipped
/ surge (push) Failing after 36s
/ lint-build-and-check (push) Failing after 55s
/ build-and-deploy-to-vercel (push) Failing after 1m13s
/ depcheck (push) Has been cancelled

This commit is contained in:
严浩
2025-03-25 10:36:19 +08:00
parent 2482608a2e
commit 2df09cf33f
13 changed files with 21 additions and 21 deletions

View File

@ -1,8 +0,0 @@
# https://github.com/depcheck/depcheck#usage
# pnpm add json -g
# pnpm exec depcheck --json | json
# pnpm exec depcheck
# ignores: ["eslint", "babel-*"]
# skip-missing: true

View File

@ -1,10 +1,10 @@
// https://github.com/depcheck/depcheck?tab=readme-ov-file#api
// node .depcheck.js
// node .github/.depcheck.js
import depcheck from 'depcheck';
const unused = await depcheck(process.cwd(), {
ignorePatterns: ['tsconfig.json'],
ignorePatterns: [],
});
console.debug(`unused.dependencies :>>`, unused.dependencies); // an array containing the unused dependencies

9
.github/.depcheckrc.yaml vendored Normal file
View File

@ -0,0 +1,9 @@
# https://github.com/depcheck/depcheck#usage
# #####
# pnpm exec depcheck --config .github/.depcheckrc.yaml
# #####
# pnpm add json -g
# pnpm exec depcheck --json | json
ignores: ['@iconify-json/*']
skip-missing: true

View File

@ -11,7 +11,7 @@ jobs:
steps:
- uses: yanhao98/composite-actions/setup-node-environment@ae9301946790d96f75c7ebe54a34bbaf9f5469d0
- run: npx depcheck || true
- run: node .depcheck.js
- run: node .github/.depcheck.js
- run: npx taze --help
- run: npx taze
- run: npx taze -a

View File

@ -60,7 +60,7 @@ export default defineConfig({
reporter: 'html',
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
testDir: './tests/e2e',
testDir: './tests/playwright',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */

View File

@ -1,5 +1,4 @@
import 'nprogress/nprogress.css'; // <link rel="stylesheet" href="https://testingcf.jsdelivr.net/npm/nprogress/nprogress.css" />
// https://unocss.dev/guide/style-reset#tailwind-compat
// <link rel="stylesheet" href="https://testingcf.jsdelivr.net/npm/@unocss/reset/tailwind.min.css" />
// import '@unocss/reset/tailwind.css';
import '@unocss/reset/tailwind-compat.css';
@ -11,7 +10,7 @@ import './main.less';
import 'primeicons/primeicons.css';
import './reset-primevue.css';
import './reset-antdv.less';
import './reset/reset-primevue.css';
import './reset/reset-antdv.less';
import 'virtual:uno.css';

View File

@ -1,4 +1,8 @@
/* https://github.com/unocss/unocss/issues/2127 */
/* https://unocss.dev/guide/style-reset#tailwind-compat */
/* The background color of some button styles in component libraries are lost when referencing the tailwind.css file.
https://github.com/unocss/unocss/issues/2127
*/
:where(button:not(.ant-btn):not(.p-button)),
:where([type='button']:not(.ant-btn):not(.p-button)),

View File

@ -96,11 +96,7 @@ export function Plugins() {
createUtils4uAutoImports([
'primevue', // 参考重写 utils4u 的 createUtils4uAutoImports 的逻辑 https://github.com/unplugin/unplugin-auto-import/blob/main/src/presets/vueuse-core.ts
]),
{
'utils4u/vue-use': createUtils4uAutoImports(['primevue'])['utils4u/vue-use'].filter(
(item) => !['useCountdown'].includes(item.toString()), // FIXME: Duplicated imports "useCountdown", the one from "@vueuse/core" has been ignored and "utils4u/vue-use" is used
),
},
createUtils4uAutoImports(['primevue'])['utils4u/vue-use'],
),
{
'consola/browser': ['consola'],