Skip to content

Commit

Permalink
build: update generate-readme & make-module scripts (banners)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 10, 2020
1 parent 8dd558c commit 2efaa7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions scripts/generate-readme
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ try {
}
};

const packageBanner = (name) =>
`![${name}](https://media.thi.ng/umbrella/banners/thing-${shortName(
name
)}.svg?${(Date.now() / 1000) | 0})`;

const blogPosts = (posts) => {
if (!posts) return;
return [
Expand Down Expand Up @@ -238,6 +243,7 @@ try {
"pkg.description": () => packageDesc(PKG),
"pkg.deps": () => packageDeps(PKG),
"pkg.size": () => packageSize(),
"pkg.banner": () => packageBanner(PKG.name),
status: () => packageStatus(META.status),
examples: () => examples(PKG.name),
supportPackages: () => supportPackages(PKG.name),
Expand Down
2 changes: 1 addition & 1 deletion scripts/make-module
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ EOF

echo "writing README.tpl.md..."
cat << 'EOF' > "$MODULE"/README.tpl.md
# ${pkg.name}
# ${pkg.banner}
[![npm version](https://img.shields.io/npm/v/${pkg.name}.svg)](https://www.npmjs.com/package/${pkg.name})
![npm downloads](https://img.shields.io/npm/dm/${pkg.name}.svg)
Expand Down

0 comments on commit 2efaa7a

Please sign in to comment.