Skip to content

Commit

Permalink
fix(gil): ignore typings files (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skillz4Killz authored Jul 26, 2022
1 parent 4eefe0b commit 256f6e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/gil/lib/utils/walk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export async function* walk(dir: string): AsyncGenerator<any, any, unknown> {
// if (d.isDirectory()) yield* walk(entry);
if (d.isDirectory()) directories.push(entry);

// Skip any non-js/ts file
if (![".js", ".ts"].some((suffix) => entry.endsWith(suffix))) continue;
// since declaration files end with ts they need to be ignored as well
else if (entry.endsWith(".d.ts")) continue;
else if (d.isFile()) yield [d.name, require(entry)];
}

Expand Down

0 comments on commit 256f6e3

Please sign in to comment.