chore: 配置项目开发环境并重构接口路由前缀
Some checks failed
Release pipeline / publish (push) Has been cancelled
Release pipeline / Always run job (push) Has been cancelled

1.  添加 .node-version 和 .npmrc 配置文件,使用 Volta 锁定 Node.js 18.16.0 版本,强制使用 pnpm 作为包管理器
2.  更新 package.json,添加 packageManager 和 engines 字段限制依赖安装版本,替换 npm 脚本为 pnpm
3.  重构设备管理模块的接口 BASE 路径和路由路径,统一命名为 device_model/device_category
4.  完善 README.md,新增环境要求、安装启动流程、常用命令和目录结构说明
This commit is contained in:
sheng
2026-06-02 14:26:17 +08:00
parent f1e73f3319
commit 8b587163df
6 changed files with 265 additions and 200 deletions

View File

@@ -1,10 +1,15 @@
{
"name": "d2-admin",
"version": "1.25.0",
"packageManager": "pnpm@10.33.0",
"engines": {
"node": ">=18.16.0 <19",
"pnpm": ">=10.33.0 <11"
},
"scripts": {
"serve": "vue-cli-service serve --open",
"start": "npm run serve",
"dev": "npm run serve",
"start": "pnpm run serve",
"dev": "pnpm run serve",
"build": "vue-cli-service build --report",
"build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
"lint": "vue-cli-service lint --fix",