Skip to content

Commit

Permalink
fix: camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
lyric-zemin committed Nov 4, 2024
1 parent bebb0e5 commit 4ef8b6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/imageMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function generateImageMap(options: RequiredOptions): Promise<void>
for (const entry of entries) {
const paths = replaceDirectory(entry, toArray(dirs)).split('/')
const name = [ns, ...(directoryAsNamespace ? paths.slice(0, -1) : []), paths.slice(-1)[0].replace(/\.[^.]+$/, '')].map(capitalize).join('')
imageMap.set(name, `/${entry}`)
imageMap.set(camelCase(name), `/${entry}`)
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/imageMap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('imageMap', () => {
Map {
"IA" => "/test/src/a.png",
"IB" => "/test/src/b.jpg",
"IC-d" => "/test/src/c-d.png",
"ICD" => "/test/src/c-d.png",
"ID@f" => "/test/src/[email protected]",
"IInnerC" => "/test/src/inner/c.png",
}
Expand Down

0 comments on commit 4ef8b6d

Please sign in to comment.