From 4417dc8700818677d6231843acc2dad128de39f1 Mon Sep 17 00:00:00 2001 From: xingyu Date: Fri, 4 Aug 2023 21:44:44 +0800 Subject: [PATCH] chore: scripts --- .env.dev | 2 +- .env.test | 31 ------------------------------- package.json | 9 +++------ 3 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 .env.test diff --git a/.env.dev b/.env.dev index 843ea018..9200ece2 100644 --- a/.env.dev +++ b/.env.dev @@ -28,4 +28,4 @@ VITE_DROP_CONSOLE=false VITE_SOURCEMAP=false # 输出路径 -VITE_OUT_DIR=dist-dev +VITE_OUT_DIR=dist diff --git a/.env.test b/.env.test deleted file mode 100644 index 0793af25..00000000 --- a/.env.test +++ /dev/null @@ -1,31 +0,0 @@ -# 测试环境 -NODE_ENV=production - -VITE_DEV=false - -# 请求路径 -VITE_BASE_URL='http://localhost:48080' - -# 上传路径 -VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload' - -# 接口前缀 -VITE_API_BASEPATH= - -# 接口地址 -VITE_API_URL=/admin-api - -# 是否删除debugger -VITE_DROP_DEBUGGER=false - -# 是否删除console.log -VITE_DROP_CONSOLE=false - -# 是否sourcemap -VITE_SOURCEMAP=true - -# 打包路径 -VITE_BASE_PATH=/ - -# 输出路径 -VITE_OUT_DIR=dist-test diff --git a/package.json b/package.json index a210c6bb..97a67de1 100644 --- a/package.json +++ b/package.json @@ -11,22 +11,19 @@ "ts:check": "vue-tsc --noEmit", "build:pro": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode pro", "build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev", + "build:base": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode base", "build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage", - "build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test", "build:static": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode static", "build:front": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode front", "serve:pro": "vite preview --mode pro", "serve:dev": "vite preview --mode dev", - "serve:test": "vite preview --mode test", - "preview": "pnpm build:dev && vite preview", - "npm:check": "npx npm-check-updates", + "preview": "pnpm build:base && vite preview", "clean": "npx rimraf node_modules", "clean:cache": "npx rimraf node_modules/.cache", "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src", "lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"", "lint:style": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", - "lint:lint-staged": "lint-staged -c ", - "lint:pretty": "pretty-quick --staged" + "lint:lint-staged": "lint-staged -c " }, "dependencies": { "@element-plus/icons-vue": "^2.1.0",