chore: Resolve merge conflicts
parent
4074a88c13
commit
082847c441
|
@ -3,3 +3,5 @@
|
||||||
|
|
||||||
# vben core onwer
|
# vben core onwer
|
||||||
/packages/@core/ anncwb@126.com
|
/packages/@core/ anncwb@126.com
|
||||||
|
/internal/ anncwb@126.com
|
||||||
|
/scripts/ anncwb@126.com
|
||||||
|
|
|
@ -49,6 +49,14 @@ jobs:
|
||||||
password: ${{ secrets.WEB_ANTD_FTP_PASSWORD }}
|
password: ${{ secrets.WEB_ANTD_FTP_PASSWORD }}
|
||||||
local-dir: ./apps/web-antd/dist/
|
local-dir: ./apps/web-antd/dist/
|
||||||
|
|
||||||
|
- name: Sync Web Naive files
|
||||||
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
||||||
|
with:
|
||||||
|
server: ${{ secrets.PRO_FTP_HOST }}
|
||||||
|
username: ${{ secrets.WEB_NAIVE_FTP_ACCOUNT }}
|
||||||
|
password: ${{ secrets.WEB_NAIVE_FTP_PASSWORD }}
|
||||||
|
local-dir: ./apps/web-naive/dist/
|
||||||
|
|
||||||
- name: Sync Website files
|
- name: Sync Website files
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
"ant-design-vue": "^4.2.3",
|
"ant-design-vue": "^4.2.3",
|
||||||
"dayjs": "^1.11.12",
|
"dayjs": "^1.11.12",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
(function () {
|
(function () {
|
||||||
var hm = document.createElement('script');
|
var hm = document.createElement('script');
|
||||||
hm.src =
|
hm.src =
|
||||||
'https://hm.baidu.com/hm.js?d20a01273820422b6aa2ee41b6c9414d';
|
'https://hm.baidu.com/hm.js?24bb3eb91dfe4ebfcbcee6952a107cb6';
|
||||||
var s = document.getElementsByTagName('script')[0];
|
var s = document.getElementsByTagName('script')[0];
|
||||||
s.parentNode.insertBefore(hm, s);
|
s.parentNode.insertBefore(hm, s);
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"naive-ui": "^2.39.0",
|
"naive-ui": "^2.39.0",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
"lucide",
|
"lucide",
|
||||||
"brotli",
|
"brotli",
|
||||||
"defu",
|
"defu",
|
||||||
|
"execa",
|
||||||
"iconify",
|
"iconify",
|
||||||
"intlify",
|
"intlify",
|
||||||
"mkdist",
|
"mkdist",
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eslint-config-turbo": "^2.0.9",
|
"eslint-config-turbo": "^2.0.10",
|
||||||
"eslint-plugin-command": "^0.2.3",
|
"eslint-plugin-command": "^0.2.3",
|
||||||
"eslint-plugin-import-x": "^3.1.0"
|
"eslint-plugin-import-x": "^3.1.0"
|
||||||
},
|
},
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
"eslint": "^9.8.0",
|
"eslint": "^9.8.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||||
"eslint-plugin-jsdoc": "^48.10.1",
|
"eslint-plugin-jsdoc": "^48.10.2",
|
||||||
"eslint-plugin-jsonc": "^2.16.0",
|
"eslint-plugin-jsonc": "^2.16.0",
|
||||||
"eslint-plugin-n": "^17.10.1",
|
"eslint-plugin-n": "^17.10.1",
|
||||||
"eslint-plugin-no-only-tests": "^3.1.0",
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
||||||
|
|
|
@ -30,13 +30,20 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@changesets/git": "^3.0.0",
|
"@changesets/git": "^3.0.0",
|
||||||
"@manypkg/get-packages": "^2.2.2",
|
"@manypkg/get-packages": "^2.2.2",
|
||||||
|
"chalk": "^5.3.0",
|
||||||
"consola": "^3.2.3",
|
"consola": "^3.2.3",
|
||||||
"dayjs": "^1.11.12",
|
"dayjs": "^1.11.12",
|
||||||
|
"execa": "^9.3.0",
|
||||||
"find-up": "^7.0.0",
|
"find-up": "^7.0.0",
|
||||||
|
"fs-extra": "^11.2.0",
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
|
"ora": "^8.0.1",
|
||||||
"pkg-types": "^1.1.3",
|
"pkg-types": "^1.1.3",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1"
|
||||||
"zx": "^8.1.4"
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/chalk": "^2.2.0",
|
||||||
|
"@types/fs-extra": "^11.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,32 @@
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
|
||||||
import { $ } from 'zx';
|
import { execa } from 'execa';
|
||||||
|
|
||||||
export * from '@changesets/git';
|
export * from '@changesets/git';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取暂存区文件
|
* 获取暂存区文件
|
||||||
*/
|
*/
|
||||||
async function getStagedFiles() {
|
async function getStagedFiles(): Promise<string[]> {
|
||||||
try {
|
try {
|
||||||
$.verbose = false;
|
const { stdout } = await execa('git', [
|
||||||
const { stdout: lines } =
|
'-c',
|
||||||
await $`git -c submodule.recurse=false diff --staged --diff-filter=ACMR --name-only --ignore-submodules -z`;
|
'submodule.recurse=false',
|
||||||
|
'diff',
|
||||||
|
'--staged',
|
||||||
|
'--diff-filter=ACMR',
|
||||||
|
'--name-only',
|
||||||
|
'--ignore-submodules',
|
||||||
|
'-z',
|
||||||
|
]);
|
||||||
|
|
||||||
let changedList = lines ? lines.replace(/\0$/, '').split('\0') : [];
|
let changedList = stdout ? stdout.replace(/\0$/, '').split('\0') : [];
|
||||||
changedList = changedList.map((item) => path.resolve(process.cwd(), item));
|
changedList = changedList.map((item) => path.resolve(process.cwd(), item));
|
||||||
const changedSet = new Set(changedList);
|
const changedSet = new Set(changedList);
|
||||||
changedSet.delete('');
|
changedSet.delete('');
|
||||||
return [...changedSet];
|
return [...changedSet];
|
||||||
} catch {
|
} catch (error) {
|
||||||
|
console.error('Failed to get staged files:', error);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,12 @@ export { generatorContentHash } from './hash';
|
||||||
export * from './monorepo';
|
export * from './monorepo';
|
||||||
export { toPosixPath } from './path';
|
export { toPosixPath } from './path';
|
||||||
export { prettierFormat } from './prettier';
|
export { prettierFormat } from './prettier';
|
||||||
|
export * from './spinner';
|
||||||
export type { Package } from '@manypkg/get-packages';
|
export type { Package } from '@manypkg/get-packages';
|
||||||
|
export { default as colors } from 'chalk';
|
||||||
export { consola } from 'consola';
|
export { consola } from 'consola';
|
||||||
|
export * from 'execa';
|
||||||
|
export { default as fs } from 'fs-extra';
|
||||||
export { nanoid } from 'nanoid';
|
export { nanoid } from 'nanoid';
|
||||||
export { type PackageJson, readPackageJSON } from 'pkg-types';
|
export { type PackageJson, readPackageJSON } from 'pkg-types';
|
||||||
export { rimraf } from 'rimraf';
|
export { rimraf } from 'rimraf';
|
||||||
export { $, chalk as colors, fs, spinner } from 'zx';
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import fs from 'fs-extra';
|
||||||
import { format, getFileInfo, resolveConfig } from 'prettier';
|
import { format, getFileInfo, resolveConfig } from 'prettier';
|
||||||
import { fs } from 'zx';
|
|
||||||
|
|
||||||
async function prettierFormat(filepath: string) {
|
async function prettierFormat(filepath: string) {
|
||||||
const prettierOptions = await resolveConfig(filepath, {});
|
const prettierOptions = await resolveConfig(filepath, {});
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
import ora, { Ora } from 'ora';
|
||||||
|
|
||||||
|
interface SpinnerOptions {
|
||||||
|
failedText?: string;
|
||||||
|
successText?: string;
|
||||||
|
title: string;
|
||||||
|
}
|
||||||
|
export async function spinner<T>(
|
||||||
|
{ failedText, successText, title }: SpinnerOptions,
|
||||||
|
callback: () => Promise<T>,
|
||||||
|
): Promise<T> {
|
||||||
|
const loading: Ora = ora(title).start();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const result = await callback();
|
||||||
|
loading.succeed(successText || 'Success!');
|
||||||
|
return result;
|
||||||
|
} catch (error) {
|
||||||
|
loading.fail(failedText || 'Failed!');
|
||||||
|
throw error;
|
||||||
|
} finally {
|
||||||
|
loading.stop();
|
||||||
|
}
|
||||||
|
}
|
|
@ -32,7 +32,6 @@
|
||||||
"cheerio": "1.0.0-rc.12",
|
"cheerio": "1.0.0-rc.12",
|
||||||
"html-minifier-terser": "^7.2.0",
|
"html-minifier-terser": "^7.2.0",
|
||||||
"nitropack": "^2.9.7",
|
"nitropack": "^2.9.7",
|
||||||
"portfinder": "^1.0.32",
|
|
||||||
"resolve.exports": "^2.0.2",
|
"resolve.exports": "^2.0.2",
|
||||||
"vite-plugin-lib-inject-css": "^2.1.1",
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
||||||
"vite-plugin-pwa": "^0.20.1",
|
"vite-plugin-pwa": "^0.20.1",
|
||||||
|
|
|
@ -5,7 +5,6 @@ import type { NitroMockPluginOptions } from '../typing';
|
||||||
import { colors, consola, getPackage } from '@vben/node-utils';
|
import { colors, consola, getPackage } from '@vben/node-utils';
|
||||||
|
|
||||||
import { build, createDevServer, createNitro, prepare } from 'nitropack';
|
import { build, createDevServer, createNitro, prepare } from 'nitropack';
|
||||||
import portfinder from 'portfinder';
|
|
||||||
|
|
||||||
const hmrKeyRe = /^runtimeConfig\.|routeRules\./;
|
const hmrKeyRe = /^runtimeConfig\.|routeRules\./;
|
||||||
|
|
||||||
|
@ -78,11 +77,6 @@ async function runNitroServer(rootDir: string, port: number, verbose: boolean) {
|
||||||
nitro.hooks.hookOnce('restart', reload);
|
nitro.hooks.hookOnce('restart', reload);
|
||||||
|
|
||||||
const server = createDevServer(nitro);
|
const server = createDevServer(nitro);
|
||||||
// 端口已经存在
|
|
||||||
const availablePort = await portfinder.getPortPromise({ port });
|
|
||||||
if (availablePort !== port) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await server.listen(port, { showURL: false });
|
await server.listen(port, { showURL: false });
|
||||||
await prepare(nitro);
|
await prepare(nitro);
|
||||||
await build(nitro);
|
await build(nitro);
|
||||||
|
@ -92,5 +86,5 @@ async function runNitroServer(rootDir: string, port: number, verbose: boolean) {
|
||||||
consola.success(colors.bold(colors.green('Nitro Mock Server started.')));
|
consola.success(colors.bold(colors.green('Nitro Mock Server started.')));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
await reload();
|
return await reload();
|
||||||
}
|
}
|
||||||
|
|
30
package.json
30
package.json
|
@ -6,12 +6,12 @@
|
||||||
"monorepo",
|
"monorepo",
|
||||||
"turbo",
|
"turbo",
|
||||||
"vben",
|
"vben",
|
||||||
"vue vben admin",
|
|
||||||
"vue vben admin pro",
|
|
||||||
"vben admin",
|
"vben admin",
|
||||||
"vben pro",
|
"vben pro",
|
||||||
"vue",
|
"vue",
|
||||||
"vue admin",
|
"vue admin",
|
||||||
|
"vue vben admin",
|
||||||
|
"vue vben admin pro",
|
||||||
"vue3"
|
"vue3"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/vbenjs/vue-vben-admin",
|
"homepage": "https://github.com/vbenjs/vue-vben-admin",
|
||||||
|
@ -27,30 +27,30 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "pnpm install",
|
"bootstrap": "pnpm install",
|
||||||
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build",
|
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build",
|
||||||
"preview": "turbo preview",
|
|
||||||
"build:analyze": "turbo build:analyze",
|
"build:analyze": "turbo build:analyze",
|
||||||
"build:docker": "./build-local-docker-image.sh",
|
"build:docker": "./build-local-docker-image.sh",
|
||||||
"changeset": "pnpm exec changeset",
|
"changeset": "pnpm exec changeset",
|
||||||
"check": "pnpm run check:circular && pnpm run check:dep && pnpm run check:type",
|
"check": "pnpm run check:circular && pnpm run check:dep && pnpm run check:type && pnpm check:cspell",
|
||||||
"check:circular": "vsh check-circular",
|
"check:circular": "vsh check-circular",
|
||||||
|
"check:cspell": "cspell lint **/*.ts **/README.md .changeset/*.md --no-progress",
|
||||||
"check:dep": "vsh check-dep",
|
"check:dep": "vsh check-dep",
|
||||||
"check:type": "turbo run typecheck",
|
"check:type": "turbo run typecheck",
|
||||||
"clean": "vsh clean",
|
"clean": "vsh clean",
|
||||||
"commit": "czg",
|
"commit": "czg",
|
||||||
"dev": "turbo-run dev",
|
"dev": "turbo-run dev",
|
||||||
"dev:antd": "pnpm -F @vben/web-antd",
|
"dev:antd": "pnpm -F @vben/web-antd run dev",
|
||||||
"dev:ele": "pnpm -F @vben/web-ele",
|
"dev:docs": "pnpm -F @vben/website run dev",
|
||||||
"dev:naive": "pnpm -F @vben/web-naive",
|
"dev:ele": "pnpm -F @vben/web-ele run dev",
|
||||||
"dev:docs": "pnpm -F @vben/website run docs:dev",
|
"dev:naive": "pnpm -F @vben/web-naive run dev",
|
||||||
"format": "vsh lint --format",
|
"format": "vsh lint --format",
|
||||||
"lint": "vsh lint",
|
"lint": "vsh lint",
|
||||||
"postinstall": "turbo run stub",
|
"postinstall": "turbo run stub",
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"prepare": "is-ci || husky",
|
"prepare": "is-ci || husky",
|
||||||
|
"preview": "turbo-run preview",
|
||||||
"publint": "vsh publint",
|
"publint": "vsh publint",
|
||||||
"reinstall": "pnpm clean --del-lock && pnpm bootstrap",
|
"reinstall": "pnpm clean --del-lock && pnpm bootstrap",
|
||||||
"test:unit": "vitest",
|
"test:unit": "vitest",
|
||||||
"turbo-run": "turbo-run",
|
|
||||||
"update:deps": " pnpm update --latest --recursive",
|
"update:deps": " pnpm update --latest --recursive",
|
||||||
"version": "pnpm exec changeset version && pnpm install --no-frozen-lockfile"
|
"version": "pnpm exec changeset version && pnpm install --no-frozen-lockfile"
|
||||||
},
|
},
|
||||||
|
@ -78,11 +78,11 @@
|
||||||
"is-ci": "^3.0.1",
|
"is-ci": "^3.0.1",
|
||||||
"jsdom": "^24.1.1",
|
"jsdom": "^24.1.1",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"turbo": "^2.0.9",
|
"turbo": "^2.0.10",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
"unbuild": "^2.0.0",
|
"unbuild": "^2.0.0",
|
||||||
"vite": "^5.3.5",
|
"vite": "^5.3.5",
|
||||||
"vitest": "^2.0.4",
|
"vitest": "^2.0.5",
|
||||||
"vue-tsc": "^2.0.29"
|
"vue-tsc": "^2.0.29"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -91,10 +91,16 @@
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.6.0",
|
"packageManager": "pnpm@9.6.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
|
"peerDependencyRules": {
|
||||||
|
"allowedVersions": {
|
||||||
|
"eslint": "*",
|
||||||
|
"@typescript-eslint/eslint-plugin": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@ctrl/tinycolor": "^4.1.0",
|
"@ctrl/tinycolor": "^4.1.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
},
|
},
|
||||||
"neverBuiltDependencies": [
|
"neverBuiltDependencies": [
|
||||||
"canvas",
|
"canvas",
|
||||||
|
|
|
@ -36,6 +36,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify/vue": "^4.1.2",
|
"@iconify/vue": "^4.1.2",
|
||||||
"lucide-vue-next": "^0.417.0",
|
"lucide-vue-next": "^0.417.0",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ctrl/tinycolor": "^4.1.0",
|
"@ctrl/tinycolor": "^4.1.0",
|
||||||
"@vue/shared": "^3.4.34",
|
"@vue/shared": "^3.4.35",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"defu": "^6.1.4",
|
"defu": "^6.1.4",
|
||||||
"lodash.clonedeep": "^4.5.0",
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"radix-vue": "^1.9.2",
|
"radix-vue": "^1.9.2",
|
||||||
"sortablejs": "^1.15.2",
|
"sortablejs": "^1.15.2",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/sortablejs": "^1.15.8"
|
"@types/sortablejs": "^1.15.8"
|
||||||
|
|
|
@ -32,6 +32,6 @@
|
||||||
"@vben-core/shared": "workspace:*",
|
"@vben-core/shared": "workspace:*",
|
||||||
"@vben-core/typings": "workspace:*",
|
"@vben-core/typings": "workspace:*",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,6 @@
|
||||||
"@vben-core/shadcn-ui": "workspace:*",
|
"@vben-core/shadcn-ui": "workspace:*",
|
||||||
"@vben-core/typings": "workspace:*",
|
"@vben-core/typings": "workspace:*",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,6 @@
|
||||||
"@vben-core/shared": "workspace:*",
|
"@vben-core/shared": "workspace:*",
|
||||||
"@vben-core/typings": "workspace:*",
|
"@vben-core/typings": "workspace:*",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,6 @@
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"lucide-vue-next": "^0.417.0",
|
"lucide-vue-next": "^0.417.0",
|
||||||
"radix-vue": "^1.9.2",
|
"radix-vue": "^1.9.2",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,6 @@
|
||||||
"@vben-core/icons": "workspace:*",
|
"@vben-core/icons": "workspace:*",
|
||||||
"@vben-core/shadcn-ui": "workspace:*",
|
"@vben-core/shadcn-ui": "workspace:*",
|
||||||
"@vben-core/typings": "workspace:*",
|
"@vben-core/typings": "workspace:*",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
"@vben/stores": "workspace:*",
|
"@vben/stores": "workspace:*",
|
||||||
"@vben/types": "workspace:*",
|
"@vben/types": "workspace:*",
|
||||||
"@vben/utils": "workspace:*",
|
"@vben/utils": "workspace:*",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,6 @@
|
||||||
"@vben/preferences": "workspace:*",
|
"@vben/preferences": "workspace:*",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"echarts": "^5.5.1",
|
"echarts": "^5.5.1",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"@vben/types": "workspace:*",
|
"@vben/types": "workspace:*",
|
||||||
"@vueuse/integrations": "^10.11.0",
|
"@vueuse/integrations": "^10.11.0",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"@vben/preferences": "workspace:*",
|
"@vben/preferences": "workspace:*",
|
||||||
"@vben/stores": "workspace:*",
|
"@vben/stores": "workspace:*",
|
||||||
"@vben/types": "workspace:*",
|
"@vben/types": "workspace:*",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0",
|
"vue-router": "^4.4.0",
|
||||||
"watermark-js-plus": "^1.5.2"
|
"watermark-js-plus": "^1.5.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"@vben/types": "workspace:*",
|
"@vben/types": "workspace:*",
|
||||||
"@vben/utils": "workspace:*",
|
"@vben/utils": "workspace:*",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vben/locales": "workspace:*",
|
"@vben/locales": "workspace:*",
|
||||||
"@vben/utils": "workspace:*",
|
"@vben/utils": "workspace:*",
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2"
|
||||||
"vue-request": "^2.0.4"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"axios-mock-adapter": "^1.22.0"
|
"axios-mock-adapter": "^1.22.0"
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
export * from './request-client';
|
export * from './request-client';
|
||||||
export * from './use-request';
|
|
||||||
export * from 'axios';
|
export * from 'axios';
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
// import { setGlobalOptions, } from 'vue-request';
|
|
||||||
|
|
||||||
// setGlobalOptions({
|
|
||||||
// manual: true,
|
|
||||||
// // ...
|
|
||||||
// });
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see https://www.attojs.com/guide/documentation/globalOptions.html
|
|
||||||
*/
|
|
||||||
export * from 'vue-request';
|
|
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@intlify/core-base": "^9.13.1",
|
"@intlify/core-base": "^9.13.1",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-i18n": "^9.13.1"
|
"vue-i18n": "^9.13.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"@vben-core/typings": "workspace:*",
|
"@vben-core/typings": "workspace:*",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"pinia-plugin-persistedstate": "^3.2.1",
|
"pinia-plugin-persistedstate": "^3.2.1",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vben-core/typings": "workspace:*",
|
"@vben-core/typings": "workspace:*",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0"
|
"vue-router": "^4.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
858
pnpm-lock.yaml
858
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,3 @@
|
||||||
# @vben/vsh
|
# @vben/turbo-run
|
||||||
|
|
||||||
shell 脚本工具集合
|
turbo-run is a command line tool that allows you to run multiple commands in parallel.
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import type { Package } from '@vben/node-utils';
|
import { execaCommand, getPackages } from '@vben/node-utils';
|
||||||
|
|
||||||
import { join } from 'node:path';
|
import { cancel, isCancel, select } from '@clack/prompts';
|
||||||
|
|
||||||
import { $, fs, getPackages } from '@vben/node-utils';
|
|
||||||
|
|
||||||
import { cancel, isCancel, multiselect } from '@clack/prompts';
|
|
||||||
|
|
||||||
interface RunOptions {
|
interface RunOptions {
|
||||||
command?: string;
|
command?: string;
|
||||||
|
@ -12,35 +8,45 @@ interface RunOptions {
|
||||||
|
|
||||||
export async function run(options: RunOptions) {
|
export async function run(options: RunOptions) {
|
||||||
const { command } = options;
|
const { command } = options;
|
||||||
|
if (!command) {
|
||||||
|
console.error('Please enter the command to run');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
const { packages } = await getPackages();
|
const { packages } = await getPackages();
|
||||||
const appPkgs = await findApps(process.cwd(), packages);
|
// const appPkgs = await findApps(process.cwd(), packages);
|
||||||
|
// const websitePkg = packages.find(
|
||||||
|
// (item) => item.packageJson.name === '@vben/website',
|
||||||
|
// );
|
||||||
|
|
||||||
const selectApps = await multiselect<any, string>({
|
// 只显示有对应命令的包
|
||||||
message: `Select the app you need to run [${command}]:`,
|
const selectPkgs = packages.filter((pkg) => {
|
||||||
options: appPkgs.map((item) => ({ label: item, value: item })),
|
return (pkg?.packageJson as Record<string, any>).scripts?.[command];
|
||||||
required: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isCancel(selectApps)) {
|
const selectPkg = await select<any, string>({
|
||||||
|
message: `Select the app you need to run [${command}]:`,
|
||||||
|
options: selectPkgs.map((item) => ({
|
||||||
|
label: item?.packageJson.name,
|
||||||
|
value: item?.packageJson.name,
|
||||||
|
})),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isCancel(selectPkg) || !selectPkg) {
|
||||||
cancel('👋 Has cancelled');
|
cancel('👋 Has cancelled');
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectApps.length === 1) {
|
execaCommand(`pnpm --filter=${selectPkg} run ${command}`, {
|
||||||
$.verbose = true;
|
stdio: 'inherit',
|
||||||
// 让控制台显示颜色
|
});
|
||||||
process.env.FORCE_COLOR = '1';
|
// const filters = [];
|
||||||
await $`pnpm --filter=${selectApps[0]} run ${command} `;
|
// for (const app of selectApps) {
|
||||||
return;
|
// filters.push(`--filter=${app}`);
|
||||||
}
|
// }
|
||||||
const filters = [];
|
// $.verbose = true;
|
||||||
for (const app of selectApps) {
|
// execaCommand(`turbo run ${command} ${filters}`, {
|
||||||
filters.push(`--filter=${app}`);
|
// stdio: 'inherit',
|
||||||
}
|
// });
|
||||||
$.verbose = true;
|
|
||||||
// 让控制台显示颜色
|
|
||||||
process.env.FORCE_COLOR = '1';
|
|
||||||
await $`turbo run ${command} ${filters}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,16 +54,12 @@ export async function run(options: RunOptions) {
|
||||||
* @param root
|
* @param root
|
||||||
* @param packages
|
* @param packages
|
||||||
*/
|
*/
|
||||||
async function findApps(root: string, packages: Package[]) {
|
// async function findApps(root: string, packages: Package[]) {
|
||||||
// apps内的
|
// // apps内的
|
||||||
const appPackages = packages
|
// const appPackages = packages.filter((pkg) => {
|
||||||
.filter((pkg) => {
|
// const viteConfigExists = fs.existsSync(join(pkg.dir, 'vite.config.mts'));
|
||||||
const viteConfigExists = fs.existsSync(join(pkg.dir, 'vite.config.mts'));
|
// return pkg.dir.startsWith(join(root, 'apps')) && viteConfigExists;
|
||||||
return pkg.dir.startsWith(join(root, 'apps')) && viteConfigExists;
|
// });
|
||||||
})
|
|
||||||
.map((pkg) => {
|
|
||||||
return pkg.packageJson.name;
|
|
||||||
});
|
|
||||||
|
|
||||||
return appPackages;
|
// return appPackages;
|
||||||
}
|
// }
|
||||||
|
|
|
@ -2,13 +2,7 @@ import type { CAC } from 'cac';
|
||||||
|
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
|
|
||||||
import {
|
import { colors, getPackages, rimraf, spinner } from '@vben/node-utils';
|
||||||
colors,
|
|
||||||
consola,
|
|
||||||
getPackages,
|
|
||||||
rimraf,
|
|
||||||
spinner,
|
|
||||||
} from '@vben/node-utils';
|
|
||||||
|
|
||||||
const CLEAN_DIRS = ['dist', 'node_modules', '.turbo'];
|
const CLEAN_DIRS = ['dist', 'node_modules', '.turbo'];
|
||||||
|
|
||||||
|
@ -38,10 +32,15 @@ async function runClean({
|
||||||
|
|
||||||
const cleanDirsText = JSON.stringify(cleanDirs);
|
const cleanDirsText = JSON.stringify(cleanDirs);
|
||||||
|
|
||||||
spinner(`${colors.dim(cleanDirsText)} cleaning in progress...`, async () => {
|
spinner(
|
||||||
await clean({ delLock, dirs: cleanDirs, recursive });
|
{
|
||||||
consola.success(colors.green(`clean up all \`${cleanDirsText}\` success.`));
|
successText: colors.green(`clean up all \`${cleanDirsText}\` success.`),
|
||||||
});
|
title: `${colors.dim(cleanDirsText)} cleaning in progress...`,
|
||||||
|
},
|
||||||
|
async () => {
|
||||||
|
await clean({ delLock, dirs: cleanDirs, recursive });
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function clean({ delLock, dirs = [], recursive }: CleanCommandOptions) {
|
async function clean({ delLock, dirs = [], recursive }: CleanCommandOptions) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import type { CAC } from 'cac';
|
import type { CAC } from 'cac';
|
||||||
|
|
||||||
import { $ } from '@vben/node-utils';
|
import { execaCommand } from '@vben/node-utils';
|
||||||
|
|
||||||
interface LintCommandOptions {
|
interface LintCommandOptions {
|
||||||
/**
|
/**
|
||||||
|
@ -10,21 +10,31 @@ interface LintCommandOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runLint({ format }: LintCommandOptions) {
|
async function runLint({ format }: LintCommandOptions) {
|
||||||
process.env.FORCE_COLOR = '3';
|
// process.env.FORCE_COLOR = '3';
|
||||||
|
|
||||||
if (format) {
|
if (format) {
|
||||||
await $`stylelint "**/*.{vue,css,less.scss}" --cache --fix`;
|
await execaCommand(`stylelint "**/*.{vue,css,less.scss}" --cache --fix`, {
|
||||||
await $`eslint . --cache --fix`;
|
stdio: 'inherit',
|
||||||
await $`prettier . --write --cache --log-level warn`;
|
});
|
||||||
|
await execaCommand(`eslint . --cache --fix`, {
|
||||||
|
stdio: 'inherit',
|
||||||
|
});
|
||||||
|
await execaCommand(`prettier . --write --cache --log-level warn`, {
|
||||||
|
stdio: 'inherit',
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.verbose = true;
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
$`cspell lint "**/*.ts" "**/README.md" ".changeset/*.md" --no-progress`,
|
execaCommand(`eslint . --cache`, {
|
||||||
$`eslint . --cache`,
|
stdio: 'inherit',
|
||||||
|
}),
|
||||||
// $`ls-lint`,
|
// $`ls-lint`,
|
||||||
$`prettier . --ignore-unknown --check --cache`,
|
execaCommand(`prettier . --ignore-unknown --check --cache`, {
|
||||||
$`stylelint "**/*.{vue,css,less.scss}" --cache`,
|
stdio: 'inherit',
|
||||||
|
}),
|
||||||
|
execaCommand(`stylelint "**/*.{vue,css,less.scss}" --cache`, {
|
||||||
|
stdio: 'inherit',
|
||||||
|
}),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,15 @@ function nav(): DefaultTheme.NavItem[] {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
link: 'https://www.vben.pro',
|
link: 'https://www.vben.pro',
|
||||||
text: '完整版(Ant Design Vue)',
|
text: 'Ant Design Vue 版本(默认)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
link: 'https://naive.vben.pro',
|
||||||
|
text: 'Naive 版本',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
link: 'https://ele.vben.pro',
|
||||||
|
text: 'Element Plus版本',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -184,6 +192,10 @@ function nav(): DefaultTheme.NavItem[] {
|
||||||
link: 'https://github.com/vbenjs/vue-vben-admin/releases',
|
link: 'https://github.com/vbenjs/vue-vben-admin/releases',
|
||||||
text: '更新日志',
|
text: '更新日志',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
link: 'https://github.com/orgs/vbenjs/projects/5',
|
||||||
|
text: '路线图',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
link: 'https://github.com/vbenjs/vue-vben-admin/blob/main/.github/contributing.md',
|
link: 'https://github.com/vbenjs/vue-vben-admin/blob/main/.github/contributing.md',
|
||||||
text: '贡献',
|
text: '贡献',
|
||||||
|
@ -220,11 +232,6 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
|
||||||
text: '为什么选择我们?',
|
text: '为什么选择我们?',
|
||||||
},
|
},
|
||||||
{ link: 'introduction/quick-start', text: '快速开始' },
|
{ link: 'introduction/quick-start', text: '快速开始' },
|
||||||
{
|
|
||||||
link: 'https://github.com/vbenjs/vue-vben-admin/releases',
|
|
||||||
text: '更新日志',
|
|
||||||
},
|
|
||||||
{ link: 'https://github.com/orgs/vbenjs/projects/5', text: '路线图' },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -251,6 +258,7 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
|
||||||
{ link: 'in-depth/features', text: '常用功能' },
|
{ link: 'in-depth/features', text: '常用功能' },
|
||||||
{ link: 'in-depth/check-updates', text: '检查更新' },
|
{ link: 'in-depth/check-updates', text: '检查更新' },
|
||||||
{ link: 'in-depth/loading', text: '全局loading' },
|
{ link: 'in-depth/loading', text: '全局loading' },
|
||||||
|
{ link: 'in-depth/ui-framework', text: '组件库切换' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vitepress build",
|
"build": "vitepress build",
|
||||||
"docs:dev": "vitepress dev",
|
"dev": "vitepress dev",
|
||||||
"docs:preview": "vitepress preview"
|
"docs:preview": "vitepress preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -13,6 +13,6 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vite-pwa/vitepress": "^0.5.0",
|
"@vite-pwa/vitepress": "^0.5.0",
|
||||||
"vitepress": "^1.3.1",
|
"vitepress": "^1.3.1",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,14 +50,18 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如
|
||||||
"bootstrap": "pnpm install",
|
"bootstrap": "pnpm install",
|
||||||
// 构建项目
|
// 构建项目
|
||||||
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build",
|
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build",
|
||||||
|
// 构建项目并分析
|
||||||
|
"build:analyze": "turbo build:analyze",
|
||||||
// 构建docker镜像
|
// 构建docker镜像
|
||||||
"build:docker": "./build-local-docker-image.sh",
|
"build:docker": "./build-local-docker-image.sh",
|
||||||
// changeset 版本管理
|
// changeset 版本管理
|
||||||
"changeset": "pnpm exec changeset",
|
"changeset": "pnpm exec changeset",
|
||||||
// 检查项目各种问题
|
// 检查项目各种问题
|
||||||
"check": "pnpm run check:circular && pnpm run check:dep && pnpm run check:type",,
|
"check": "pnpm run check:circular && pnpm run check:dep && pnpm run check:type && pnpm check:cspell",
|
||||||
// 检查循环引用
|
// 检查循环引用
|
||||||
"check:circular": "vsh check-circular",
|
"check:circular": "vsh check-circular",
|
||||||
|
// 检查拼写
|
||||||
|
"check:cspell": "cspell lint **/*.ts **/README.md .changeset/*.md --no-progress"
|
||||||
// 检查依赖
|
// 检查依赖
|
||||||
"check:dep": "vsh check-dep",
|
"check:dep": "vsh check-dep",
|
||||||
// 检查类型
|
// 检查类型
|
||||||
|
@ -67,9 +71,15 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如
|
||||||
// 提交代码
|
// 提交代码
|
||||||
"commit": "czg",
|
"commit": "czg",
|
||||||
// 启动项目(默认会运行整个仓库所有包的dev脚本)
|
// 启动项目(默认会运行整个仓库所有包的dev脚本)
|
||||||
"dev": "cross-env TURBO_UI=1 turbo run dev",
|
"dev": "turbo-run dev",
|
||||||
|
// 启动web-antd应用
|
||||||
|
"dev:antd": "pnpm -F @vben/web-antd run dev",
|
||||||
// 启动文档
|
// 启动文档
|
||||||
"dev:docs": "pnpm -F @vben/website run docs:dev",
|
"dev:docs": "pnpm -F @vben/website run dev",
|
||||||
|
// 启动 element plus应用
|
||||||
|
"dev:ele": "pnpm -F @vben/web-ele run dev",
|
||||||
|
// 启动web-naive应用
|
||||||
|
"dev:naive": "pnpm -F @vben/web-naive run dev",
|
||||||
// 格式化代码
|
// 格式化代码
|
||||||
"format": "vsh lint --format",
|
"format": "vsh lint --format",
|
||||||
// lint 代码
|
// lint 代码
|
||||||
|
@ -80,6 +90,8 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
// husky的安装
|
// husky的安装
|
||||||
"prepare": "is-ci || husky",
|
"prepare": "is-ci || husky",
|
||||||
|
// 预览应用
|
||||||
|
"preview": "turbo-run preview",
|
||||||
// 包规范检查
|
// 包规范检查
|
||||||
"publint": "vsh publint",
|
"publint": "vsh publint",
|
||||||
// 删除所有的node_modules、yarn.lock、package.lock.json,重新安装依赖
|
// 删除所有的node_modules、yarn.lock、package.lock.json,重新安装依赖
|
||||||
|
@ -96,12 +108,33 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如
|
||||||
|
|
||||||
## 本地运行项目
|
## 本地运行项目
|
||||||
|
|
||||||
如需本地运行文档,并进行调整,可以执行以下命令:
|
如需本地运行文档,并进行调整,可以执行以下命令,执行该命令,你可以选择需要的应用进行开发:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm dev
|
pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
如果你想直接运行某个应用,可以执行以下命令:
|
||||||
|
|
||||||
|
运行 `web-antd` 应用:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm dev:antd
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
运行 `web-naive` 应用:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm dev:naive
|
||||||
|
```
|
||||||
|
|
||||||
|
运行 `website` 应用:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm dev:docs
|
||||||
|
```
|
||||||
|
|
||||||
## DevTools
|
## DevTools
|
||||||
|
|
||||||
项目内置了 [Vue DevTools](https://github.com/vuejs/devtools-next) 插件,可以在开发过程中使用。默认关闭,可在`.env.development` 内开启,并重新运行项目即可:
|
项目内置了 [Vue DevTools](https://github.com/vuejs/devtools-next) 插件,可以在开发过程中使用。默认关闭,可在`.env.development` 内开启,并重新运行项目即可:
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
# 组件库切换
|
||||||
|
|
||||||
|
`Vue Admin` 支持你自由选择组件库,目前演示站点的默认组件库是 `Ant Design Vue`,与旧版本保持一致。同时框架还内置了 `Element Plus` 版本和 `Naive UI` 版本,你可以根据自己的喜好选择。
|
||||||
|
|
||||||
|
## 新增组件库应用
|
||||||
|
|
||||||
|
如果你想用其他别的组件库,你只需要按一下步骤进行操作:
|
||||||
|
|
||||||
|
1. 在`apps`内创建一个新的文件夹,例如`apps/web-xxx`。
|
||||||
|
2. 更改`apps/web-xxx/package.json`的`name`字段为`web-xxx`。
|
||||||
|
3. 移除其他组件库依赖及代码,并用你的组件库进行替换相应逻辑,需要改动的地方不多。
|
||||||
|
4. 调整`locales`内的语言文件。
|
||||||
|
5. 调整 `app.vue` 内的组件。
|
||||||
|
6. 自行适配组件库的主题,与 `Vben Admin` 契合。
|
||||||
|
7. 调整 `.env` 内的应用名
|
||||||
|
8. 在大仓根目录增加 `dev:xxx` 脚本
|
Loading…
Reference in New Issue