Skip to content

Commit

Permalink
feat(glob): replace glob with fast-glob
Browse files Browse the repository at this point in the history
  • Loading branch information
srod committed Nov 13, 2024
1 parent 7190391 commit 939b1bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"dependencies": {
"@node-minify/utils": "workspace:*",
"fast-glob": "^3.3.2",
"glob": "10.3.3",
"mkdirp": "3.0.1"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import path from "node:path";
import type { Settings } from "@node-minify/types";
import { utils } from "@node-minify/utils";
import { globSync } from "glob";
import fg from "fast-glob";

/**
* Default settings.
Expand Down Expand Up @@ -154,7 +154,7 @@ const wildcardsArray = (input: string[], publicFolder?: string) => {
});

if (isWildcardsPresent) {
output.input = globSync(inputWithPublicFolder);
output.input = fg.globSync(inputWithPublicFolder);
}

// Remove all wildcards from array
Expand All @@ -178,7 +178,7 @@ const getFilesFromWildcards = (input: string, publicFolder?: string) => {
let output: string[] = [];

if (input.indexOf("*") > -1) {
output = globSync((publicFolder || "") + input);
output = fg.globSync((publicFolder || "") + input);
}

return output;
Expand Down

0 comments on commit 939b1bf

Please sign in to comment.