mirror of
https://github.com/chenasraf/DefinitelyTyped-tools.git
synced 2026-05-18 01:49:03 +00:00
Merge pull request #698 from ffflorian/feat/readme-links
feat: Make readme more readable
This commit is contained in:
committed by
Andrew Branch
parent
20477d70a5
commit
bb7badea38
@@ -187,18 +187,18 @@ export function createReadme(typing: TypingsData, reg: Registry): string {
|
||||
lines.push("");
|
||||
|
||||
lines.push("# Details");
|
||||
lines.push(`Files were exported from ${definitelyTypedURL}/tree/${sourceBranch}/types/${typing.subDirectoryPath}`);
|
||||
lines.push(`Files were exported from ${definitelyTypedURL}/tree/${sourceBranch}/types/${typing.subDirectoryPath}.`);
|
||||
|
||||
lines.push("");
|
||||
lines.push("Additional Details");
|
||||
lines.push("### Additional Details");
|
||||
lines.push(` * Last updated: ${(new Date()).toUTCString()}`);
|
||||
const dependencies = Array.from(typing.dependencies).map(d => getFullNpmName(d.name));
|
||||
lines.push(` * Dependencies: ${dependencies.length ? dependencies.join(", ") : "none"}`);
|
||||
lines.push(` * Global values: ${typing.globals.length ? typing.globals.join(", ") : "none"}`);
|
||||
lines.push(` * Dependencies: ${dependencies.length ? dependencies.map(d => `[${d}](https://npmjs.com/package/${d})`).join(", ") : "none"}`);
|
||||
lines.push(` * Global values: ${typing.globals.length ? typing.globals.map(g => `\`${g}\``).join(", ") : "none"}`);
|
||||
lines.push("");
|
||||
|
||||
lines.push("# Credits");
|
||||
const contributors = typing.contributors.map(({ name, url }) => `${name} <${url}>`).join(", ").replace(/, ([^,]+)$/, ", and $1");
|
||||
const contributors = typing.contributors.map(({ name, url }) => `${name} (${url})`).join(", ").replace(/, ([^,]+)$/, ", and $1");
|
||||
lines.push(`These definitions were written by ${contributors}.`);
|
||||
lines.push("");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user