Skip to content

Commit 1cb6e3f

Browse files
committed
chore: add defaultConfig export
chore: wip
1 parent bdc64ad commit 1cb6e3f

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/config.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ import type { DtsGenerationConfig } from './types'
22
import process from 'node:process'
33
import { loadConfig } from 'bunfig'
44

5+
export const defaultConfig: DtsGenerationConfig = {
6+
cwd: process.cwd(),
7+
root: './src',
8+
entrypoints: ['**/*.ts'],
9+
outdir: './dist',
10+
keepComments: true,
11+
clean: true,
12+
tsconfigPath: './tsconfig.json',
13+
outputStructure: 'mirror',
14+
verbose: false,
15+
}
16+
517
// Get loaded config
6-
// @ts-expect-error bunfig error due to current dtsx incompatibility (0009)
718
// eslint-disable-next-line antfu/no-top-level-await
819
export const config: DtsGenerationConfig = await loadConfig({
920
name: 'dts',
10-
defaultConfig: {
11-
cwd: process.cwd(),
12-
root: './src',
13-
entrypoints: ['**/*.ts'],
14-
outdir: './dist',
15-
keepComments: true,
16-
clean: true,
17-
tsconfigPath: './tsconfig.json',
18-
outputStructure: 'mirror',
19-
},
21+
defaultConfig,
2022
})

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { config } from './config'
1+
export * from './config'
22
export * from './extract'
33
export * from './generate'
44
export * from './types'

0 commit comments

Comments
 (0)