Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/dts-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ function mapOptions(argObj) {
//"newline", // Manual
//"indent", // not implemented
"prefix",
// "separator", not implemented
//"separator", not implemented
"externals",
//"exclude", // not implemented
"includePrivate",
"removeSource",
"verbose",
"referenceExternals",
Expand Down Expand Up @@ -71,6 +72,7 @@ program
.option('--referenceExternals', 'reference external modules as <reference path="..." /> tags *** Experimental, TEST NEEDED')
//.option('--exclude ', 'filter to exclude typings, either a RegExp or a callback. match path relative to opts.baseDir')
.option('--removeSource', 'delete all source typings (i.e. "<baseDir>/**/*.d.ts")')
.option('--includePrivate', 'include private members in output')
.option('--newline [style]', 'newline style to use in output file => unix|windows|currentOsDefault', /^(unix|windows|currentOsDefault)$/i)
//.option('--indent', 'indentation to use in output file')
.option('--prefix [value]', 'prefix for rewriting module names')
Expand All @@ -92,4 +94,4 @@ if (!result.emitted) {
console.log("Result no emitted - use verbose to see details.");
process.exit(1);
}


4 changes: 3 additions & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface Options {
separator?: string;
externals?: boolean;
exclude?: { (file: string): boolean; } | RegExp;
includePrivate?: boolean;
removeSource?: boolean;
verbose?: boolean;
referenceExternals?: boolean;
Expand Down Expand Up @@ -99,6 +100,7 @@ export function bundle(options: Options): BundleResult {

const externals = optValue(options.externals, false);
const exclude = optValue(options.exclude, null);
const includePrivate = optValue(options.includePrivate, null);
const removeSource = optValue(options.removeSource, false);
const referenceExternals = optValue(options.referenceExternals, false);
const emitOnIncludedFileNotFound = optValue(options.emitOnIncludedFileNotFound, false);
Expand Down Expand Up @@ -688,7 +690,7 @@ export function bundle(options: Options): BundleResult {
}

// private member
if (privateExp.test(line)) {
if (!includePrivate && privateExp.test(line)) {
queuedJSDoc = null;
return;
}
Expand Down