Skip to content

Commit bf00cef

Browse files
committed
Fix casing when exporting modules
1 parent 32c4ed3 commit bf00cef

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/red-ears-argue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@codama/renderers-js': patch
3+
---
4+
5+
Fix bug that did not camelcase exported modules properly

src/fragments/indexPage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { CamelCaseString } from '@codama/nodes';
1+
import { camelCase } from '@codama/nodes';
22

33
import { Fragment, getExportAllFragment, mergeFragments } from '../utils';
44

5-
export function getIndexPageFragment(items: { name: CamelCaseString }[]): Fragment | undefined {
5+
export function getIndexPageFragment(items: { name: string }[]): Fragment | undefined {
66
if (items.length === 0) return;
77

88
const names = items
9-
.map(item => item.name)
9+
.map(item => camelCase(item.name))
1010
.sort((a, b) => a.localeCompare(b))
1111
.map(name => getExportAllFragment(`./${name}`));
1212

0 commit comments

Comments
 (0)