remark-contributors
Version:
remark plugin to inject a given list of contributors into a table
20 lines (19 loc) • 621 B
TypeScript
/**
* Get `contributors` from the `package.json` closest to a file.
*
* @param {VFile} file
* File.
* @returns {Promise<ReadonlyArray<Contributor> | undefined>}
* Contributors.
*/
export function getContributorsFromPackage(file: VFile): Promise<ReadonlyArray<Contributor> | undefined>;
export type PackageJson = import('type-fest').PackageJson;
export type VFile = import('vfile').VFile;
/**
* Contributor in string form (`name <email> (url)`) or as object.
*/
export type Contributor = ContributorObject | string;
/**
* Contributor with fields.
*/
export type ContributorObject = Record<string, unknown>;