Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Nov 7, 2024
1 parent 00fb715 commit df30cd0
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/cli.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ const defaultOptions: DtsGenerationConfig = {
keepComments: true,
clean: false,
tsconfigPath: 'tsconfig.json',
verbose: false,
}

cli
@@ -29,7 +30,7 @@ cli
.option('--keep-comments', 'Keep comments in generated .d.ts files', { default: defaultOptions.keepComments })
.option('--clean', 'Clean output directory before generation', { default: defaultOptions.clean })
.option('--tsconfig <path>', 'Path to tsconfig.json', { default: defaultOptions.tsconfigPath })
// .option('--verbose', 'Enable verbose logging', { default: false })
.option('--verbose', 'Enable verbose logging', { default: defaultOptions.verbose })
.example('dtsx generate')
.example('dtsx generate --entrypoints src/index.ts,src/utils.ts --outdir dist/types')
.action(async (options: DtsGenerationOption) => {
@@ -42,12 +43,9 @@ cli
tsconfigPath: resolve(options.tsconfigPath || defaultOptions.tsconfigPath),
keepComments: options.keepComments || defaultOptions.keepComments,
clean: options.clean || defaultOptions.clean,
verbose: options.verbose || defaultOptions.verbose,
}

// if (options.verbose) {
// console.log('Using options:', mergedOptions)
// }

await generate(config)
}
catch (error) {
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { DtsGenerationConfig } from './types'
import process from 'node:process'
// @ts-expect-error - types are missing for now
import { loadConfig } from 'bun-config'

// Get loaded config

0 comments on commit df30cd0

Please # to comment.