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 fac8a4d commit d8abcb9Copy full SHA for d8abcb9
src/index.js
@@ -21,9 +21,15 @@ const compress = string =>
21
.replace(/\//g, `_`) // Convert '/' to '_'
22
.replace(/=+$/, ``); // Remove ending '='
23
24
+const ignoredFiles = new Set([
25
+ 'node_modules',
26
+ 'package-lock.json',
27
+ 'yarn.lock'
28
+])
29
+
30
const getAllFiles = dirPath =>
31
fs.readdirSync(dirPath).reduce((acc, file) => {
- if (file === 'node_modules') return acc;
32
+ if (ignoredFiles.has(file)) return acc;
33
const relativePath = dirPath + '/' + file;
34
const isDirectory = fs.statSync(relativePath).isDirectory();
35
const additions = isDirectory ? getAllFiles(relativePath) : [relativePath];
0 commit comments