Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/lib/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class Application extends ChildableComponent<Application, AbstractCompone
*/
public expandInputFiles(inputFiles?: string[]): string[] {
let files: string[] = [];
const exclude: Array<IMinimatch> = this.exclude ? this.exclude.map(pattern => new Minimatch(pattern)) : [];
const exclude: Array<IMinimatch> = this.exclude ? this.exclude.map(pattern => new Minimatch(pattern, {dot: true})) : [];

function isExcluded(fileName: string): boolean {
return exclude.some(mm => mm.match(fileName));
Expand Down
1 change: 1 addition & 0 deletions src/test/.dot/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {};
9 changes: 9 additions & 0 deletions src/test/typedoc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Application } from '..';
import * as Path from 'path';
import Assert = require('assert');
import './.dot';

describe('TypeDoc', function() {
let application: Application;
Expand Down Expand Up @@ -55,5 +56,13 @@ describe('TypeDoc', function() {
Assert.equal(expanded.indexOf(Path.join(inputFiles, 'access', 'access.ts')), -1);
Assert.equal(expanded.indexOf(inputFiles), -1);
});
it('supports excluding directories beginning with dots', function() {
const inputFiles = __dirname;
application.options.setValue('exclude', '**/+(.dot)/**');
const expanded = application.expandInputFiles([inputFiles]);

Assert.equal(expanded.indexOf(Path.join(inputFiles, '.dot', 'index.d.ts')), -1);
Assert.equal(expanded.indexOf(inputFiles), -1);
});
});
});