Skip to content

Commit 0756615

Browse files
authored
Link to example, if available
Repos tagged custom-element use the homepage field to link to their examples. Expose those in this README.
1 parent a4d490f commit 0756615

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

generate.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ We have ${repos.length} open source custom elements:
7171
for (const repo of repos) {
7272
bowerJson.dependencies[repo.name] = repo.full_name
7373
packageJson.dependencies[`@${repo.full_name}`] = '*'
74+
let exampleLink = '';
75+
if (repo.homepage) {
76+
exampleLink = ` | [Example](${repo.homepage})`
77+
}
7478
readme += `
7579
### [${escape(repo.full_name)}](${repo.html_url})
7680
7781
${escape(repo.description)}
7882
79-
[Link](${repo.html_url})
83+
[Repository](${repo.html_url})${exampleLink}
8084
`
8185
}
8286
readme += readFileSync('readme.tail.md', 'utf-8')

0 commit comments

Comments
 (0)