Skip to content

Commit

Permalink
add ignore node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Hajime-san committed Feb 9, 2023
1 parent 32359d6 commit 9c4c985
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export const main = async (args: {
const _basePath = basePath ?? '.';
const tsConfigPath = options?.tsConfigPath ?? './tsconfig.json';
const match = [/\.js$/, /\.mjs$/, /\.ts$/, /\.mts$/, /\.jsx$/, /\.tsx$/];
const skip = [/node_modules/];
const decoder = new TextDecoder('utf-8');
const tsConfigJson = await Deno.readFile(tsConfigPath);
const tsConfigObject = ts.parseJsonConfigFileContent(
Expand All @@ -195,7 +196,7 @@ export const main = async (args: {
result: string;
}> = [];

for await (const entry of walk(_basePath, { match })) {
for await (const entry of walk(_basePath, { match, skip })) {
if (entry.isFile) {
const targetPath = entry.path;
const currentFileAbsPath = path.resolve(targetPath);
Expand Down

0 comments on commit 9c4c985

Please sign in to comment.