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
10 changes: 9 additions & 1 deletion lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as ts from "typescript";
import * as fs from "fs";
import * as path from "path";
import * as commandpost from "commandpost";

import * as glob from "glob";
import * as lib from "./";
import { getConfigFileName, readFilesFromTsconfig } from "./utils";

Expand Down Expand Up @@ -94,6 +94,14 @@ let root = commandpost
process.stdout.write(root.helpText() + "\n");
return;
}
let matchedFiles = new Array();
files.forEach((pattern) => {
const matched = glob.sync(pattern);
if (matched && matched.length > 0) {
matchedFiles = matchedFiles.concat(matched);
}
});
files = matchedFiles;

if (verbose) {
const printPool: { [name: string]: string; } = {};
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
},
"dependencies": {
"commandpost": "^1.0.0",
"editorconfig": "^0.15.0"
"editorconfig": "^0.15.0",
"glob": "^7.1.2"
},
"peerDependencies": {
"typescript": "^2.1.6 || ^3.0.0 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev"
},
"devDependencies": {
"@types/glob": "^5.0.35",
"@types/mkdirp": "^0.5.0",
"@types/mocha": "^5.0.0",
"@types/node": "^10.3.0",
Expand Down