feat(env): add clean dependency

This commit is contained in:
qianmoQ 2024-11-17 17:00:42 +08:00
parent 5c1628c478
commit fcefc1d197
2 changed files with 23 additions and 14 deletions

View File

@ -0,0 +1,23 @@
#!/bin/bash
echo "Clean dependencies"
echo "Task: check dependencies"
depcheck --json > depcheck-output.json
echo "Task: remove unused dependencies"
UNUSED_DEPENDENCIES=$(jq -r '.dependencies[]' depcheck-output.json)
for PACKAGE in $UNUSED_DEPENDENCIES; do
pnpm remove $PACKAGE
done
echo "Task: remove unused dev dependencies"
UNUSED_DEV_DEPENDENCIES=$(jq -r '.devDependencies[]' depcheck-output.json)
for PACKAGE in $UNUSED_DEV_DEPENDENCIES; do
pnpm remove $PACKAGE --save-dev
done
echo "Task: install dependencies again"
pnpm install --fix
echo "Clean dependencies done"

View File

@ -13,35 +13,22 @@
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/vue-fontawesome": "^3.0.6",
"@radix-icons/vue": "^1.0.0",
"@tanstack/vue-table": "^8.13.2",
"@vee-validate/zod": "^4.12.6",
"@visactor/vchart": "^1.10.0",
"@visactor/vtable": "^0.21.2",
"@vue-flow/background": "^1.3.0",
"@vue-flow/controls": "^1.1.1",
"@vue-flow/core": "^1.33.4",
"@vue-flow/node-resizer": "^1.3.6",
"@vueuse/core": "^10.9.0",
"ace-builds": "^1.32.7",
"ag-grid-community": "^31.3.4",
"ag-grid-vue3": "^31.3.4",
"ansi_up": "^6.0.2",
"axios": "^1.7.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"embla-carousel": "^8.0.2",
"embla-carousel-autoplay": "^8.0.2",
"embla-carousel-vue": "^8.0.2",
"export-to-csv": "^1.2.4",
"lodash": "^4.17.21",
"md-editor-v3": "^4.12.1",
"nprogress": "^0.2.0",
"radix-vue": "^1.5.2",
"uuid": "^9.0.1",
"vaul-vue": "^0.1.0",
"view-shadcn-ui": "2024.4.0-alpha.1731814030",
"view-ui-plus": "^1.3.16",
"vue": "^3.4.21",
"vue-clipboard3": "^2.0.0",
"vue-i18n": "^9.10.1",
@ -57,7 +44,6 @@
"@types/lodash": "^4.17.0",
"@types/node": "^20.11.26",
"@types/nprogress": "^0.2.3",
"@types/uuid": "^9.0.8",
"@vitejs/plugin-vue": "^5.0.4",
"tippy.js": "^6.3.7",
"typescript": "^5.2.2",