-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
40 lines (39 loc) · 1.14 KB
/
tsdown.config.ts
File metadata and controls
40 lines (39 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: [
'src/index.ts',
'src/schemas.ts',
'src/algorithms.ts',
'src/format-support.ts',
'src/queries.ts',
// Formats — each gets its own subpath export
'src/formats/adjacency-list/index.ts',
'src/formats/converter/index.ts',
'src/formats/cytoscape/index.ts',
'src/formats/d3/index.ts',
'src/formats/dot/index.ts',
'src/formats/edge-list/index.ts',
'src/formats/gexf/index.ts',
'src/formats/gml/index.ts',
'src/formats/graphml/index.ts',
'src/formats/jgf/index.ts',
'src/formats/tgf/index.ts',
'src/formats/elk/index.ts',
'src/formats/xyflow/index.ts',
'src/formats/mermaid/index.ts',
],
exports: {
customExports(exports) {
const remapped: Record<string, any> = {};
for (const [key, value] of Object.entries(exports)) {
// Strip ./formats/ prefix → ./cytoscape, ./dot, etc.
if (key.startsWith('./formats/')) {
remapped[key.replace('./formats/', './')] = value;
} else {
remapped[key] = value;
}
}
return remapped;
},
},
})