From b5ab1a8ec6ae0e3b8d47e4533f026d20ab700d1a Mon Sep 17 00:00:00 2001 From: Cy Brown Date: Tue, 11 Aug 2015 13:25:28 +0200 Subject: [PATCH] Add glob for issue #26 --- index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 1aa9efc..97e6ba6 100644 --- a/index.ts +++ b/index.ts @@ -56,11 +56,13 @@ function getFilenames(baseDir: string, files:string[]): string[] { return files.map(function (filename) { var resolvedFilename = pathUtil.resolve(filename); if (resolvedFilename.indexOf(baseDir) === 0) { - return resolvedFilename; + return glob.sync(resolvedFilename); } - return pathUtil.resolve(baseDir, filename); - }); + return glob.sync(pathUtil.resolve(baseDir, filename)); + }).reduce((result, pathArray) => { + return result.concat(pathArray); + }, []); } function processTree(sourceFile: ts.SourceFile, replacer:(node: ts.Node) => string): string {