Upgrade linguist dependency

This version changes how it counts python heredoc. All heredoc is
counted as code.
This commit is contained in:
Andrew Eisenberg 2021-08-25 10:45:44 -07:00
parent a44b61d961
commit b29bf7b05a
32 changed files with 410 additions and 339 deletions

View file

@ -15,7 +15,7 @@ commander_1.default
.description('count lines of code in a file')
.action(async (pathPattern) => {
try {
const info = await (new file_1.LocFile(pathPattern).getFileInfo());
const info = await new file_1.LocFile(pathPattern).getFileInfo();
// eslint-disable-next-line no-console
console.log(chalk_1.default.cyan(`
path: \t\t${pathPattern}
@ -42,9 +42,9 @@ const formatInfo = (info, languages) => `
.join('')}`;
commander_1.default.arguments('<cmd> [env]').action(async (cmd) => {
try {
const { info, languages } = await (new directory_1.LocDir({
include: cmd
}).loadInfo());
const { info, languages } = await new directory_1.LocDir({
include: cmd,
}).loadInfo();
// eslint-disable-next-line no-console
console.log(chalk_1.default.cyan(formatInfo(info, languages)));
}