We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e26392 commit 30557a8Copy full SHA for 30557a8
build.ts
@@ -6,14 +6,12 @@ function escapeRegExp(string: string) {
6
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
7
}
8
9
-async function* glob(
+function glob(
10
path: string,
11
- pattern = "**/*.*"
12
-): AsyncGenerator<string> {
+ pattern = "**/*.{ts,tsx,js,jsx}"
+): AsyncIterableIterator<string> {
13
const glob = new Glob(pattern);
14
- for await (const name of glob.scan({ cwd: path, onlyFiles: true })) {
15
- yield join(path, name);
16
- }
+ return glob.scan({ cwd: path, onlyFiles: true, absolute: true })
17
18
19
export async function build({
0 commit comments