Skip to content

Commit

Permalink
fix: more code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Aug 1, 2024
1 parent b762cc2 commit 0939b89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default [
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/naming-convention": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/import-style": "off",
"no-await-in-loop": "off"
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { generateFavicon } from "./factory/favicon.js"
import { generateWebManifest } from "./factory/manifest.js"
import { generateReactComponent } from "./factory/react.js"
import { generateOptimizedSvg } from "./factory/svg.js"
import type { Options } from "./options.js";
import type { Options } from "./options.js"
import { DEFAULTS } from "./options.js"

export async function processSvgFile(filePath: string, options: Options) {
Expand Down Expand Up @@ -52,8 +52,8 @@ export async function processSvgFiles(dirPath: string, options = DEFAULTS) {
for (const file of files) {
const filePath = path.join(dirPath, file)
const stat = await fs.stat(filePath)
if (stat && stat.isDirectory()) {
processSvgFiles(filePath, options)
if (stat.isDirectory()) {
await processSvgFiles(filePath, options)
} else if (path.extname(file) === ".svg" && !file.endsWith("-opt.svg")) {
await processSvgFile(filePath, options)
}
Expand Down

0 comments on commit 0939b89

Please sign in to comment.