mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 14:13:40 +08:00
chore: Requires pnpm 8 and node 16
This commit is contained in:
3
.env
3
.env
@@ -1,6 +1,3 @@
|
|||||||
# port
|
|
||||||
VITE_PORT = 3100
|
|
||||||
|
|
||||||
# spa-title
|
# spa-title
|
||||||
VITE_GLOB_APP_TITLE = Vben Admin
|
VITE_GLOB_APP_TITLE = Vben Admin
|
||||||
|
|
||||||
|
@@ -24,10 +24,6 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
|
|||||||
for (const envName of Object.keys(envConf)) {
|
for (const envName of Object.keys(envConf)) {
|
||||||
let realName = envConf[envName].replace(/\\n/g, '\n');
|
let realName = envConf[envName].replace(/\\n/g, '\n');
|
||||||
realName = realName === 'true' ? true : realName === 'false' ? false : realName;
|
realName = realName === 'true' ? true : realName === 'false' ? false : realName;
|
||||||
|
|
||||||
if (envName === 'VITE_PORT') {
|
|
||||||
realName = Number(realName);
|
|
||||||
}
|
|
||||||
if (envName === 'VITE_PROXY' && realName) {
|
if (envName === 'VITE_PROXY' && realName) {
|
||||||
try {
|
try {
|
||||||
realName = JSON.parse(realName.replace(/'/g, '"'));
|
realName = JSON.parse(realName.replace(/'/g, '"'));
|
||||||
|
96
package.json
96
package.json
@@ -1,6 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "vben-admin",
|
"name": "vben-admin",
|
||||||
"version": "2.9.0",
|
"version": "2.9.0",
|
||||||
|
"homepage": "https://github.com/anncwb/vue-vben-admin",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/anncwb/vue-vben-admin/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/anncwb/vue-vben-admin.git"
|
||||||
|
},
|
||||||
|
"license": "MIT",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "vben",
|
"name": "vben",
|
||||||
"email": "anncwb@126.com",
|
"email": "anncwb@126.com",
|
||||||
@@ -29,9 +38,43 @@
|
|||||||
"test:gzip": "npx http-server dist --cors --gzip -c-1",
|
"test:gzip": "npx http-server dist --cors --gzip -c-1",
|
||||||
"test:br": "npx http-server dist --cors --brotli -c-1",
|
"test:br": "npx http-server dist --cors --brotli -c-1",
|
||||||
"reinstall": "rimraf pnpm-lock.yaml && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
|
"reinstall": "rimraf pnpm-lock.yaml && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
|
||||||
|
"preinstall": "npx only-allow pnpm",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"gen:icon": "esno ./build/generate/icon/index.ts"
|
"gen:icon": "esno ./build/generate/icon/index.ts"
|
||||||
},
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{js,jsx,ts,tsx}": [
|
||||||
|
"eslint --fix",
|
||||||
|
"prettier --write"
|
||||||
|
],
|
||||||
|
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
|
||||||
|
"prettier --write--parser json"
|
||||||
|
],
|
||||||
|
"package.json": [
|
||||||
|
"prettier --write"
|
||||||
|
],
|
||||||
|
"*.vue": [
|
||||||
|
"eslint --fix",
|
||||||
|
"prettier --write",
|
||||||
|
"stylelint --fix"
|
||||||
|
],
|
||||||
|
"*.{scss,less,styl,html}": [
|
||||||
|
"stylelint --fix",
|
||||||
|
"prettier --write"
|
||||||
|
],
|
||||||
|
"*.md": [
|
||||||
|
"prettier --write"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"commitizen": {
|
||||||
|
"path": "node_modules/cz-git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"bin-wrapper": "npm:bin-wrapper-china",
|
||||||
|
"gifsicle": "5.2.0"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/colors": "^6.0.0",
|
"@ant-design/colors": "^6.0.0",
|
||||||
"@ant-design/icons-vue": "^6.1.0",
|
"@ant-design/icons-vue": "^6.1.0",
|
||||||
@@ -65,16 +108,16 @@
|
|||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"tinymce": "^5.10.7",
|
"tinymce": "^5.10.7",
|
||||||
"vditor": "^3.8.13",
|
"vditor": "^3.8.13",
|
||||||
"vue": "^3.2.45",
|
"vue": "^3.2.47",
|
||||||
"vue-i18n": "^9.1.9",
|
"vue-i18n": "^9.1.9",
|
||||||
"vue-json-pretty": "^2.0.6",
|
"vue-json-pretty": "^2.0.6",
|
||||||
"vue-router": "^4.0.14",
|
"vue-router": "^4.0.14",
|
||||||
"vue-types": "^4.1.1",
|
"vue-types": "^4.1.1",
|
||||||
|
"vuedraggable": "^4.1.0",
|
||||||
"vxe-table": "^4.3.9",
|
"vxe-table": "^4.3.9",
|
||||||
"vxe-table-plugin-export-xlsx": "^3.0.4",
|
"vxe-table-plugin-export-xlsx": "^3.0.4",
|
||||||
"xe-utils": "^3.5.7",
|
"xe-utils": "^3.5.7",
|
||||||
"xlsx": "^0.18.5",
|
"xlsx": "^0.18.5"
|
||||||
"vuedraggable": "^4.1.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^16.2.3",
|
"@commitlint/cli": "^16.2.3",
|
||||||
@@ -151,50 +194,9 @@
|
|||||||
"vue-eslint-parser": "^8.3.0",
|
"vue-eslint-parser": "^8.3.0",
|
||||||
"vue-tsc": "^1.0.9"
|
"vue-tsc": "^1.0.9"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"packageManager": "pnpm@8.1.0",
|
||||||
"bin-wrapper": "npm:bin-wrapper-china",
|
|
||||||
"rollup": "^2.56.3",
|
|
||||||
"gifsicle": "5.2.0"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/anncwb/vue-vben-admin.git"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/anncwb/vue-vben-admin/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/anncwb/vue-vben-admin",
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12 || >=14"
|
"node": ">=16.15.1",
|
||||||
},
|
"pnpm": ">=8.1.0"
|
||||||
"lint-staged": {
|
|
||||||
"*.{js,jsx,ts,tsx}": [
|
|
||||||
"eslint --fix",
|
|
||||||
"prettier --write"
|
|
||||||
],
|
|
||||||
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
|
|
||||||
"prettier --write--parser json"
|
|
||||||
],
|
|
||||||
"package.json": [
|
|
||||||
"prettier --write"
|
|
||||||
],
|
|
||||||
"*.vue": [
|
|
||||||
"eslint --fix",
|
|
||||||
"prettier --write",
|
|
||||||
"stylelint --fix"
|
|
||||||
],
|
|
||||||
"*.{scss,less,styl,html}": [
|
|
||||||
"stylelint --fix",
|
|
||||||
"prettier --write"
|
|
||||||
],
|
|
||||||
"*.md": [
|
|
||||||
"prettier --write"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"commitizen": {
|
|
||||||
"path": "node_modules/cz-git"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5492
pnpm-lock.yaml
generated
5492
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -27,18 +27,6 @@
|
|||||||
"/#/*": ["types/*"]
|
"/#/*": ["types/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src", "types", "build", "mock", "vite.config.ts"],
|
||||||
"tests/**/*.ts",
|
|
||||||
"src/**/*.ts",
|
|
||||||
"src/**/*.d.ts",
|
|
||||||
"src/**/*.tsx",
|
|
||||||
"src/**/*.vue",
|
|
||||||
"types/**/*.d.ts",
|
|
||||||
"types/**/*.ts",
|
|
||||||
"build/**/*.ts",
|
|
||||||
"build/**/*.d.ts",
|
|
||||||
"mock/**/*.ts",
|
|
||||||
"vite.config.ts"
|
|
||||||
],
|
|
||||||
"exclude": ["node_modules", "tests/server/**/*.ts", "dist", "**/*.js"]
|
"exclude": ["node_modules", "tests/server/**/*.ts", "dist", "**/*.js"]
|
||||||
}
|
}
|
||||||
|
1
types/global.d.ts
vendored
1
types/global.d.ts
vendored
@@ -57,7 +57,6 @@ declare global {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare interface ViteEnv {
|
declare interface ViteEnv {
|
||||||
VITE_PORT: number;
|
|
||||||
VITE_USE_MOCK: boolean;
|
VITE_USE_MOCK: boolean;
|
||||||
VITE_USE_PWA: boolean;
|
VITE_USE_PWA: boolean;
|
||||||
VITE_PUBLIC_PATH: string;
|
VITE_PUBLIC_PATH: string;
|
||||||
|
@@ -27,7 +27,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
// The boolean type read by loadEnv is a string. This function can be converted to boolean type
|
// The boolean type read by loadEnv is a string. This function can be converted to boolean type
|
||||||
const viteEnv = wrapperEnv(env);
|
const viteEnv = wrapperEnv(env);
|
||||||
|
|
||||||
const { VITE_PORT, VITE_PUBLIC_PATH, VITE_PROXY, VITE_DROP_CONSOLE } = viteEnv;
|
const { VITE_PUBLIC_PATH, VITE_PROXY, VITE_DROP_CONSOLE } = viteEnv;
|
||||||
|
|
||||||
const isBuild = command === 'build';
|
const isBuild = command === 'build';
|
||||||
|
|
||||||
@@ -56,7 +56,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
https: true,
|
https: true,
|
||||||
// Listening on all local IPs
|
// Listening on all local IPs
|
||||||
host: true,
|
host: true,
|
||||||
port: VITE_PORT,
|
|
||||||
// Load proxy configuration from .env
|
// Load proxy configuration from .env
|
||||||
proxy: createProxy(VITE_PROXY),
|
proxy: createProxy(VITE_PROXY),
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user