linguist-js
Version:
Analyse the programming languages used in a folder or from raw content, using the same rules that GitHub Linguist does.
21 lines (20 loc) • 666 B
TypeScript
import { Ignore } from 'ignore';
interface WalkInput {
/** Whether this is walking the tree from the root */
init: boolean;
/** The common root absolute path of all folders being checked */
commonRoot: string;
/** The absolute path that each folder is relative to */
folderRoots: string[];
/** The absolute path of folders being checked */
folders: string[];
/** An instantiated Ignore object listing ignored files */
ignored: Ignore;
}
interface WalkOutput {
files: string[];
folders: string[];
}
/** Generate list of files in a directory. */
export default function walkTree(data: WalkInput): WalkOutput;
export {};