Skip to content

Commit

Permalink
allow to specify outFile (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanpopelyshev authored and englercj committed Jan 9, 2019
1 parent f98d63e commit 84bd5be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function publish(data: TDocletDb, opts: ITemplateConfig)

const pkgArray: any = helper.find(data, { kind: 'package' }) || [];
const pkg = pkgArray[0] as IPackageDoclet;
const out = path.join(opts.destination, pkg && pkg.name ? `${pkg.name}.d.ts` : 'types.d.ts');
const out = path.join(opts.destination, opts.outFile || pkg && pkg.name ? `${pkg.name}.d.ts` : 'types.d.ts');

fs.writeFileSync(out, emitter.emit());
}
Expand Down
1 change: 1 addition & 0 deletions src/typings/dts-jsdoc.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare interface ITemplateConfig {
destination: string;
outFile: string;
private?: boolean;
verbose?: boolean;
}

0 comments on commit 84bd5be

Please sign in to comment.