linguist-js
Version:
Analyse languages used in a folder. Powered by GitHub Linguist, although it doesn't need to be installed.
18 lines (17 loc) • 500 B
TypeScript
import * as T from '../types';
export type FlagAttributes = {
'vendored': boolean | null;
'generated': boolean | null;
'documentation': boolean | null;
'detectable': boolean | null;
'binary': boolean | null;
'language': T.LanguageResult;
};
export type ParsedGitattributes = Array<{
glob: T.FileGlob;
attrs: FlagAttributes;
}>;
/**
* Parses a gitattributes file.
*/
export default function parseAttributes(content: string, folderRoot?: string): ParsedGitattributes;