diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000..8b52258 --- /dev/null +++ b/.env.dev @@ -0,0 +1,8 @@ +NODE_ENV=development +#开发环境 +VITE_GLOB_API_URL=http://cqyt.dev.yg.dt.io + +#应急求助-websocket +VITE_GLOB_API_YIN_JI=ws://cqyt.dev.yg.dt.io/health-watch/websocket/watchMonitor +#健康监测工具报警-websocket +VITE_GLOB_API_JIAN_CE=ws://cqyt.dev.yg.dt.io/health-emergency/websocket/emergency diff --git a/.env.production b/.env.production index 00bd5f1..93e1a12 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,6 @@ #后台地址 VITE_GLOB_API_URL=https://api.cqygjk.com #应急求助-websocket -VITE_GLOB_API_YIN_JI=ws://api.cqygjk.com/health-watch/websocket/watchMonitor +VITE_GLOB_API_YIN_JI=wss://api.cqygjk.com/health-watch/websocket/watchMonitor #健康监测工具报警-websocket -VITE_GLOB_API_JIAN_CE=ws://api.cqygjk.com/health-emergency/websocket/emergency +VITE_GLOB_API_JIAN_CE=wss://api.cqygjk.com/health-emergency/websocket/emergency diff --git a/env.test b/.env.test similarity index 92% rename from env.test rename to .env.test index 52a13b3..f9fb6d2 100644 --- a/env.test +++ b/.env.test @@ -1,3 +1,4 @@ +NODE_ENV=development #测试环境 VITE_GLOB_API_URL=http://cqyt.test.yg.dt.io diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 97% rename from .eslintrc.js rename to .eslintrc.cjs index b6a3904..902cf2b 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -1,7 +1,8 @@ // @ts-check -import {defineConfig} from 'eslint-define-config' +// import {defineConfig} from 'eslint-define-config' // const {defineConfig} = require('eslint-define-config'); -export default { + +module.exports = { root: true, env: { browser: true, diff --git a/.gitignore b/.gitignore index a547bf3..3446cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +pnpm-lock.yaml diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..8cb5dc2 --- /dev/null +++ b/.npmrc @@ -0,0 +1,5 @@ +shamefully-hoist=true +strict-peer-dependencies=false +registry=https://registry.npmmirror.com +auto-install-peers=true +canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas \ No newline at end of file diff --git a/package.json b/package.json index cee59a4..9974b66 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ "scripts": { "dev": "vite --open", "build": "vue-tsc && vite build", + "build:dev": "vue-tsc && vite build --mode dev", + "build:test": "vue-tsc && vite build --mode test", "preview": "vite preview", "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"" }, @@ -27,6 +29,9 @@ "devDependencies": { "@ant-design/colors": "^7.0.0", "@ant-design/icons-vue": "^6.1.0", + "@types/node": "^20.10.5", + "@typescript-eslint/eslint-plugin": "^6.15.0", + "@typescript-eslint/parser": "^6.15.0", "@vitejs/plugin-vue": "^4.2.3", "ant-design-vue": "^3.2.20", "echarts": "^5.4.3", @@ -34,8 +39,9 @@ "eslint-config-prettier": "^8.10.0", "eslint-define-config": "^1.24.1", "eslint-plugin-jest": "^27.4.2", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-vue": "^9.17.0", + "jest": "^29.7.0", "less": "^4.2.0", "typescript": "^5.0.2", "vite": "^4.4.5",