Skip to content

Commit ff2c8b9

Browse files
authored
fix: cannot resolve tsdoc config option (#33)
1 parent 358b833 commit ff2c8b9

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/cli.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ export const flags = {
2626
},
2727
'tsdoc-config': {
2828
type: 'string',
29-
alias: 't'
29+
alias: 't',
30+
default: ''
3031
}
3132
} as const
3233

@@ -98,18 +99,18 @@ const genStyle = [GenerateStyle.Prefix, GenerateStyle.Directory].includes(
9899
debug('packageDocsStyle', genStyleFlag, genStyle)
99100

100101
// tsdoc configratio
101-
const tsdocConfig = cli.flags['tsdoc-config']
102+
const tsdocConfig = cli.flags['tsdocConfig'] as string
103+
debug('tsdocConfig', tsdocConfig)
102104

103105
// run
104106
try {
105107
;(async () => {
106108
await generate(input, output, {
107109
style: genStyle,
108110
config,
109-
tsdocConfigPath:
110-
tsdocConfig != null
111-
? path.resolve(process.cwd(), tsdocConfig)
112-
: undefined,
111+
tsdocConfigPath: !tsdocConfig
112+
? path.resolve(process.cwd(), tsdocConfig)
113+
: undefined,
113114
errorOnTSDocConfig: (error: string): void => {
114115
console.log(chalk.yellow(`⚠️ Error on TSDoc configration: ${error}`))
115116
},

0 commit comments

Comments
 (0)