mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
chore: migrate fast-glob to tinyglobby (#23020)
* chore: migrate fast-glob to tinyglobby * fix: ssr tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import path from 'path'
|
||||
import fs from 'fs-extra'
|
||||
import fg from 'fast-glob'
|
||||
import { glob } from 'tinyglobby'
|
||||
|
||||
async function generateLLms() {
|
||||
const cwd = process.cwd()
|
||||
@@ -12,7 +12,7 @@ async function generateLLms() {
|
||||
// Ensure siteDir exists
|
||||
await fs.ensureDir(siteDir)
|
||||
|
||||
const docs = await fg(
|
||||
const docs = await glob(
|
||||
`{${docsDir.join(',')}}/**/*{${matchSuffixes.join(',')}}`,
|
||||
{
|
||||
cwd,
|
||||
@@ -72,7 +72,7 @@ async function generateLLms() {
|
||||
// 在examples目录下查找对应的Vue示例文件
|
||||
const examplesDir = path.join(cwd, 'examples', componentName)
|
||||
if (fs.existsSync(examplesDir)) {
|
||||
const vueFiles = await fg('**/*.vue', {
|
||||
const vueFiles = await glob('**/*.vue', {
|
||||
cwd: examplesDir,
|
||||
absolute: true,
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@ import path from 'path'
|
||||
import Inspect from 'vite-plugin-inspect'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
import mkcert from 'vite-plugin-mkcert'
|
||||
import glob from 'fast-glob'
|
||||
import { glob } from 'tinyglobby'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import Icons from 'unplugin-icons/vite'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { camelize } from '@vue/shared'
|
||||
import glob from 'fast-glob'
|
||||
import { glob } from 'tinyglobby'
|
||||
import { docRoot, docsDirName, projRoot } from '@element-plus/build-utils'
|
||||
import { REPO_BRANCH, REPO_PATH } from '@element-plus/build-constants'
|
||||
import { getLang, languages } from '../utils/lang'
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||
"chalk": "^4.1.2",
|
||||
"consola": "^2.15.3",
|
||||
"fast-glob": "^3.2.11",
|
||||
"tinyglobby": "^0.2.15",
|
||||
"markdown-it-container": "^3.0.0",
|
||||
"unocss": "^66.5.6",
|
||||
"unplugin-icons": "^0.14.15",
|
||||
|
||||
Reference in New Issue
Block a user