diginext-img-magic-cli 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,16 +9,16 @@ const getAllFiles = function (dirPath, arrayOfFiles, ignoreFolders) {
9
9
  const files = fs_1.default.readdirSync(dirPath);
10
10
  arrayOfFiles = arrayOfFiles || [];
11
11
  files.forEach(function (file) {
12
- if (fs_1.default.statSync(dirPath + "/" + file).isDirectory()) {
12
+ const dirFile = path_1.default.join(dirPath, "/", file).replace(/\\/g, "/");
13
+ if (fs_1.default.statSync(dirFile).isDirectory()) {
13
14
  // Skip ignored folders
14
- if (ignoreFolders && ignoreFolders.includes(file))
15
+ if (ignoreFolders && ignoreFolders.includes(dirFile))
15
16
  return;
16
- arrayOfFiles = getAllFiles(dirPath + "/" + file, arrayOfFiles, ignoreFolders);
17
+ arrayOfFiles = getAllFiles(dirFile, arrayOfFiles, ignoreFolders);
17
18
  }
18
19
  else {
19
- const __path = path_1.default.join(dirPath, "/", file).replace(/\\/g, "/");
20
20
  if (arrayOfFiles)
21
- arrayOfFiles.push(__path);
21
+ arrayOfFiles.push(dirFile);
22
22
  }
23
23
  });
24
24
  return arrayOfFiles;
@@ -4,16 +4,16 @@ const getAllFiles = function (dirPath, arrayOfFiles, ignoreFolders) {
4
4
  const files = fs.readdirSync(dirPath);
5
5
  arrayOfFiles = arrayOfFiles || [];
6
6
  files.forEach(function (file) {
7
- if (fs.statSync(dirPath + "/" + file).isDirectory()) {
7
+ const dirFile = path.join(dirPath, "/", file).replace(/\\/g, "/");
8
+ if (fs.statSync(dirFile).isDirectory()) {
8
9
  // Skip ignored folders
9
- if (ignoreFolders && ignoreFolders.includes(file))
10
+ if (ignoreFolders && ignoreFolders.includes(dirFile))
10
11
  return;
11
- arrayOfFiles = getAllFiles(dirPath + "/" + file, arrayOfFiles, ignoreFolders);
12
+ arrayOfFiles = getAllFiles(dirFile, arrayOfFiles, ignoreFolders);
12
13
  }
13
14
  else {
14
- const __path = path.join(dirPath, "/", file).replace(/\\/g, "/");
15
15
  if (arrayOfFiles)
16
- arrayOfFiles.push(__path);
16
+ arrayOfFiles.push(dirFile);
17
17
  }
18
18
  });
19
19
  return arrayOfFiles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginext-img-magic-cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "sideEffects": false,
5
5
  "readme": "README.md",
6
6
  "bin": {