1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-25 06:14:14 +02:00

enhance: use native glob (#16965)

* enhance: use native glob

* remove tiny-glob

* remove fast-glob

* refactor

* fix: use async glob if possible

---------

Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
syuilo
2025-12-11 23:08:26 +09:00
committed by GitHub
parent 2cffd9f0fb
commit 8e6fffee68
18 changed files with 44 additions and 118 deletions

View File

@@ -19,7 +19,6 @@
"dependencies": {
"@tabler/icons-webfont": "3.35.0",
"harfbuzzjs": "0.4.13",
"tiny-glob": "0.2.9",
"tsx": "4.20.6",
"typescript": "5.9.3",
"wawoff2": "2.0.1"

View File

@@ -3,9 +3,8 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { promises as fsp, existsSync } from 'fs';
import path from 'path';
import glob from 'tiny-glob';
import { promises as fsp, existsSync } from 'node:fs';
import path from 'node:path';
import { generateSubsettedFont } from './subsetter.js';
const filesToScan = {
@@ -47,8 +46,8 @@ async function main() {
const iconsToPack = new Set<string>();
const cwd = path.resolve(process.cwd(), '../../');
const files = await glob(dir, { cwd });
for (const file of files) {
const files = fsp.glob(dir, { cwd });
for await (const file of files) {
//console.log(`Scanning ${file}`);
const content = await fsp.readFile(path.resolve(cwd, file), 'utf-8');
const classRegex = /ti-[a-z0-9-]+/g;