Add the github-linguist package

This commit only adds a single package and all of its transitive
dependencies. The github-linguist package will be used for counting
lines of code as a baseline for databases we are analyzing.
This commit is contained in:
Andrew Eisenberg 2021-04-22 15:33:01 -07:00
parent 896b4ff181
commit c4a84a93d4
152 changed files with 17057 additions and 24 deletions

25
node_modules/github-linguist/src/utils.ts generated vendored Normal file
View file

@ -0,0 +1,25 @@
import fs from 'fs';
import path from 'path';
// @ts-ignore
import slash from 'slash2';
const packagePath = slash(path.join(__dirname, '../', 'package.json'));
/**
* Get package version.
*
* @export getVersion
* @returns {string}
*/
export function getVersion(): string {
const packageInfo = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
return (packageInfo && packageInfo.version) || 'invalid version!';
}
export const ExtensionJustify = {
'.ts': 'typescript',
'.jsx': 'javascript',
'.js': 'javascript',
'.tsx': 'typescript',
};