Skip to content

Commit d8abcb9

Browse files
author
Guy Thomas
committed
ignore lockfiles
1 parent fac8a4d commit d8abcb9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ const compress = string =>
2121
.replace(/\//g, `_`) // Convert '/' to '_'
2222
.replace(/=+$/, ``); // Remove ending '='
2323

24+
const ignoredFiles = new Set([
25+
'node_modules',
26+
'package-lock.json',
27+
'yarn.lock'
28+
])
29+
2430
const getAllFiles = dirPath =>
2531
fs.readdirSync(dirPath).reduce((acc, file) => {
26-
if (file === 'node_modules') return acc;
32+
if (ignoredFiles.has(file)) return acc;
2733
const relativePath = dirPath + '/' + file;
2834
const isDirectory = fs.statSync(relativePath).isDirectory();
2935
const additions = isDirectory ? getAllFiles(relativePath) : [relativePath];

0 commit comments

Comments
 (0)