|
|
|
@ -1,63 +1,79 @@
|
|
|
|
|
{
|
|
|
|
|
"name": "mall4v",
|
|
|
|
|
// 指定项目为私有,这意味着它不会被发布到npm注册表。
|
|
|
|
|
"private": true,
|
|
|
|
|
// 项目的版本号,遵循语义化版本控制规则。
|
|
|
|
|
"version": "0.0.0",
|
|
|
|
|
// 指定项目使用ES模块系统。
|
|
|
|
|
"type": "module",
|
|
|
|
|
"scripts": {
|
|
|
|
|
// 在安装依赖之前运行的命令,这里强制使用pnpm进行安装。
|
|
|
|
|
"preinstall": "npx only-allow pnpm",
|
|
|
|
|
// 启动开发服务器,使用Vite构建工具。
|
|
|
|
|
"dev": "vite",
|
|
|
|
|
// 启动带有测试模式的开发服务器。
|
|
|
|
|
"dev:test": "vite --mode testing",
|
|
|
|
|
// 构建生产环境下的代码。
|
|
|
|
|
"build": "vite build",
|
|
|
|
|
// 构建带有测试模式的生产代码。
|
|
|
|
|
"build:test": "vite build --mode testing",
|
|
|
|
|
// 使用eslint检查src目录下的.js和.vue文件。
|
|
|
|
|
"lint": "eslint --ext .js,.vue src",
|
|
|
|
|
// 自动修复eslint检测到的问题。
|
|
|
|
|
"lint:fix": "eslint --fix --ext .js,.vue src",
|
|
|
|
|
// 预览构建好的应用。
|
|
|
|
|
"preview": "vite preview",
|
|
|
|
|
// 对暂存区中的文件执行指定的lint命令。
|
|
|
|
|
"lint:staged": "lint-staged"
|
|
|
|
|
},
|
|
|
|
|
// 指定Node.js和pnpm的最低版本要求。
|
|
|
|
|
"engines": {
|
|
|
|
|
"node": ">=16",
|
|
|
|
|
"pnpm": ">=6"
|
|
|
|
|
},
|
|
|
|
|
"dependencies": {
|
|
|
|
|
"@element-plus/icons-vue": "2.1.0",
|
|
|
|
|
"@smallwei/avue": "^3.2.22",
|
|
|
|
|
"axios": "1.3.4",
|
|
|
|
|
"big.js": "6.2.1",
|
|
|
|
|
"browser-image-compression": "2.0.2",
|
|
|
|
|
"crypto-js": "4.1.1",
|
|
|
|
|
"echarts": "5.4.1",
|
|
|
|
|
"element-plus": "2.3.6",
|
|
|
|
|
"element-resize-detector": "1.2.4",
|
|
|
|
|
"js-base64": "3.7.5",
|
|
|
|
|
"lodash": "4.17.21",
|
|
|
|
|
"moment": "2.29.4",
|
|
|
|
|
"pinia": "2.0.33",
|
|
|
|
|
"qs": "6.11.1",
|
|
|
|
|
"vue": "3.2.47",
|
|
|
|
|
"vue-cookies": "1.8.3",
|
|
|
|
|
"vue-draggable-next": "2.1.1",
|
|
|
|
|
"vue-router": "4.1.6"
|
|
|
|
|
// 开发和运行时依赖项,以下是项目所依赖的库及其版本:
|
|
|
|
|
"@element-plus/icons-vue": "2.1.0", // Element Plus图标库
|
|
|
|
|
"@smallwei/avue": "^3.2.22", // Avue组件库
|
|
|
|
|
"axios": "1.3.4", // HTTP请求库
|
|
|
|
|
"big.js": "6.2.1", // 精确的浮点数运算库
|
|
|
|
|
"browser-image-compression": "2.0.2", // 浏览器端图片压缩库
|
|
|
|
|
"crypto-js": "4.1.1", // 加密算法库
|
|
|
|
|
"echarts": "5.4.1", // 数据可视化图表库
|
|
|
|
|
"element-plus": "2.3.6", // Element Plus UI库
|
|
|
|
|
"element-resize-detector": "1.2.4", // 监测DOM元素大小变化的库
|
|
|
|
|
"js-base64": "3.7.5", // Base64编码解码库
|
|
|
|
|
"lodash": "4.17.21", // JavaScript实用工具库
|
|
|
|
|
"moment": "2.29.4", // 日期处理库(注意:现在官方推荐使用date-fns或dayjs)
|
|
|
|
|
"pinia": "2.0.33", // Vue的状态管理库
|
|
|
|
|
"qs": "6.11.1", // 查询字符串解析和序列化库
|
|
|
|
|
"vue": "3.2.47", // Vue框架核心库
|
|
|
|
|
"vue-cookies": "1.8.3", // Vue插件用于操作浏览器cookies
|
|
|
|
|
"vue-draggable-next": "2.1.1", // Vue组件用于实现拖拽功能
|
|
|
|
|
"vue-router": "4.1.6" // Vue路由管理库
|
|
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
|
|
|
|
"@babel/eslint-parser": "^7.21.3",
|
|
|
|
|
"@vitejs/plugin-vue": "^4.1.0",
|
|
|
|
|
"eslint": "^8.38.0",
|
|
|
|
|
"eslint-config-standard": "^17.0.0",
|
|
|
|
|
"eslint-plugin-import": "^2.27.5",
|
|
|
|
|
"eslint-plugin-n": "^15.7.0",
|
|
|
|
|
"eslint-plugin-promise": "^6.1.1",
|
|
|
|
|
"eslint-plugin-vue": "^9.10.0",
|
|
|
|
|
"eslint-plugin-vue-scoped-css": "^2.4.0",
|
|
|
|
|
"lint-staged": "13.2.2",
|
|
|
|
|
"sass": "^1.59.3",
|
|
|
|
|
"unplugin-auto-import": "^0.15.1",
|
|
|
|
|
"unplugin-vue-components": "^0.24.1",
|
|
|
|
|
"vite": "^4.3.9",
|
|
|
|
|
"vite-plugin-compression": "^0.5.1",
|
|
|
|
|
"vite-plugin-eslint": "^1.8.1",
|
|
|
|
|
"vite-plugin-svg-icons": "^2.0.1",
|
|
|
|
|
"vue-eslint-parser": "^9.1.1"
|
|
|
|
|
// 开发时依赖项,仅在开发环境中使用:
|
|
|
|
|
"@babel/eslint-parser": "^7.21.3", // Babel ESLint解析器
|
|
|
|
|
"@vitejs/plugin-vue": "^4.1.0", // Vite插件支持Vue
|
|
|
|
|
"eslint": "^8.38.0", // ESLint代码检查工具
|
|
|
|
|
"eslint-config-standard": "^17.0.0", // ESLint标准配置
|
|
|
|
|
"eslint-plugin-import": "^2.27.5", // ESLint插件用于检查import/export语句
|
|
|
|
|
"eslint-plugin-n": "^15.7.0", // ESLint插件用于Node.js代码
|
|
|
|
|
"eslint-plugin-promise": "^6.1.1", // ESLint插件用于Promise相关规则
|
|
|
|
|
"eslint-plugin-vue": "^9.10.0", // ESLint插件用于Vue特定规则
|
|
|
|
|
"eslint-plugin-vue-scoped-css": "^2.4.0", // ESLint插件用于检查Vue单文件组件中的CSS作用域
|
|
|
|
|
"lint-staged": "13.2.2", // 工具,在提交git前对暂存区文件执行任务
|
|
|
|
|
"sass": "^1.59.3", // Sass预处理器
|
|
|
|
|
"unplugin-auto-import": "^0.15.1", // 插件自动导入API
|
|
|
|
|
"unplugin-vue-components": "^0.24.1", // 插件自动注册Vue组件
|
|
|
|
|
"vite": "^4.3.9", // 快速前端构建工具
|
|
|
|
|
"vite-plugin-compression": "^0.5.1", // Vite插件提供资源压缩
|
|
|
|
|
"vite-plugin-eslint": "^1.8.1", // Vite插件集成ESLint
|
|
|
|
|
"vite-plugin-svg-icons": "^2.0.1", // Vite插件方便使用SVG图标
|
|
|
|
|
"vue-eslint-parser": "^9.1.1" // Vue语法的ESLint解析器
|
|
|
|
|
},
|
|
|
|
|
// 配置当暂存区中有*.js或*.vue文件时,自动执行的命令。
|
|
|
|
|
"lint-staged": {
|
|
|
|
|
"*.{js,vue}": [
|
|
|
|
|
"eslint --fix"
|
|
|
|
|