mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-22 18:44:02 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user